diff --git a/prisma/migrations/20251025074624_added_topic/migration.sql b/prisma/migrations/20251025074624_added_topic/migration.sql new file mode 100644 index 0000000..63d16ab --- /dev/null +++ b/prisma/migrations/20251025074624_added_topic/migration.sql @@ -0,0 +1,10 @@ +/* + Warnings: + + - You are about to drop the column `content` on the `Task` table. All the data in the column will be lost. + - Added the required column `topic` to the `Task` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "public"."Task" RENAME COLUMN "content" TO "topic"; +ALTER TABLE "public"."Task" ADD COLUMN "description" TEXT; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2e33c1e..f35fc62 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -23,9 +23,10 @@ model Task { userId Int user User @relation(fields: [userId], references: [id]) - checked Boolean @default(false) - checked_at DateTime? - content String + checked Boolean @default(false) + checked_at DateTime? + topic String + description String? parentId Int? parent Task? @relation("Subtasks", fields: [parentId], references: [id])