mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-11-21 01:37:01 +01:00
18 lines
639 B
Diff
18 lines
639 B
Diff
--- template/app/migrations/20240105224550_tasks/migration.sql
|
|
+++ opensaas-sh/app/migrations/20240105224550_tasks/migration.sql
|
|
@@ -0,0 +1,14 @@
|
|
+-- CreateTable
|
|
+CREATE TABLE "Task" (
|
|
+ "id" TEXT NOT NULL,
|
|
+ "description" TEXT NOT NULL,
|
|
+ "time" TEXT NOT NULL DEFAULT '1',
|
|
+ "isDone" BOOLEAN NOT NULL DEFAULT false,
|
|
+ "userId" INTEGER NOT NULL,
|
|
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
+
|
|
+ CONSTRAINT "Task_pkey" PRIMARY KEY ("id")
|
|
+);
|
|
+
|
|
+-- AddForeignKey
|
|
+ALTER TABLE "Task" ADD CONSTRAINT "Task_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|