improvement: all demo bugs fixed. give me more baby.

This commit is contained in:
2026-07-08 02:53:47 +03:30
parent 86b1e3afff
commit 8d334833ff
23 changed files with 876 additions and 626 deletions

View File

@@ -0,0 +1,13 @@
-- Move the "important" flag from individual tasks to the case as a whole.
ALTER TABLE "lab_cases" ADD COLUMN "isImportant" BOOLEAN NOT NULL DEFAULT false;
-- Carry over existing importance: a case is important if any of its tasks were.
UPDATE "lab_cases" lc
SET "isImportant" = true
WHERE EXISTS (
SELECT 1 FROM "lab_case_tasks" t
WHERE t."labCaseId" = lc."id" AND t."isImportant" = true
);
DROP INDEX IF EXISTS "lab_case_tasks_labCaseId_isImportant_idx";
ALTER TABLE "lab_case_tasks" DROP COLUMN "isImportant";