updated schema for task to have topic and description

This commit is contained in:
Patrick 2025-10-25 09:52:36 +02:00
parent 2911f05dcd
commit a6f22ea3c9
2 changed files with 14 additions and 3 deletions

View File

@ -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;

View File

@ -23,9 +23,10 @@ model Task {
userId Int userId Int
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])
checked Boolean @default(false) checked Boolean @default(false)
checked_at DateTime? checked_at DateTime?
content String topic String
description String?
parentId Int? parentId Int?
parent Task? @relation("Subtasks", fields: [parentId], references: [id]) parent Task? @relation("Subtasks", fields: [parentId], references: [id])