feat: update a migration to make the task-project foreign key set null on delete

This commit is contained in:
Matouš Volf 2024-09-08 08:35:06 +02:00
parent 15e925118e
commit 0cddc3c205

View File

@ -6,6 +6,6 @@ CREATE TABLE "tasks"(
"deadline" DATE,
"category" JSONB NOT NULL,
"project_id" INT4,
FOREIGN KEY ("project_id") REFERENCES "projects"("id")
FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE SET NULL
);