Files
vfxreview/prisma/migrations/20261007000000_daily_board/migration.sql
T
twotalesanimation 34af26dfbf feat(board): daily board linked to shots
A /board page that replaces the shared doc used as the day-to-day tracker.
One card per active/on-hold project with a status line, dated milestones
and to-do lines typed or pasted in the doc's own format:

  DH2_VFX_027_090 finalise (CHRIS)
  DH2_VFX_005_010 gfx update @michelle wait: client GFX ADH_GFX_005_020

Shot codes link to the shot (live status + latest version), (NAME)/@name
assigns, wait: marks a blocker, headings group lines. Codes that match no
shot are flagged, with a relink when there is an obvious near miss.

Board lines are their own model, not Tasks: tasks drive shot status and
notifications, and a note like "finalise" must not touch either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:30:40 +02:00

45 lines
2.0 KiB
SQL

-- Daily board: the day-to-day tracker that used to live in a shared doc,
-- now linked to shots. Board items are notes, not tasks, so nothing here
-- feeds shot status.
ALTER TABLE "projects" ADD COLUMN "boardStatus" TEXT;
ALTER TABLE "projects" ADD COLUMN "boardStatusAt" TIMESTAMP(3);
CREATE TABLE "board_items" (
"id" TEXT NOT NULL,
"projectId" TEXT NOT NULL,
"shotId" TEXT,
"code" TEXT,
"text" TEXT NOT NULL,
"group" TEXT NOT NULL DEFAULT '',
"assigneeId" TEXT,
"waitingOn" TEXT,
"sortOrder" INTEGER NOT NULL DEFAULT 0,
"doneAt" TIMESTAMP(3),
"doneById" TEXT,
"createdById" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "board_items_pkey" PRIMARY KEY ("id")
);
CREATE TABLE "project_milestones" (
"id" TEXT NOT NULL,
"projectId" TEXT NOT NULL,
"label" TEXT NOT NULL,
"date" TIMESTAMP(3) NOT NULL,
"doneAt" TIMESTAMP(3),
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "project_milestones_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "board_items_projectId_doneAt_idx" ON "board_items"("projectId", "doneAt");
CREATE INDEX "board_items_shotId_idx" ON "board_items"("shotId");
CREATE INDEX "project_milestones_projectId_date_idx" ON "project_milestones"("projectId", "date");
ALTER TABLE "board_items" ADD CONSTRAINT "board_items_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "board_items" ADD CONSTRAINT "board_items_shotId_fkey" FOREIGN KEY ("shotId") REFERENCES "shots"("id") ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE "board_items" ADD CONSTRAINT "board_items_assigneeId_fkey" FOREIGN KEY ("assigneeId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE "project_milestones" ADD CONSTRAINT "project_milestones_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;