From a6f22ea3c9283eeffb1c2fbd2eb99828ff0e4a7a Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 25 Oct 2025 09:52:36 +0200 Subject: [PATCH] updated schema for task to have topic and description --- .../20251025074624_added_topic/migration.sql | 10 ++++++++++ prisma/schema.prisma | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 prisma/migrations/20251025074624_added_topic/migration.sql 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])