This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- AlterTable: add notes field to shots
|
||||
ALTER TABLE "shots" ADD COLUMN "notes" TEXT;
|
||||
|
||||
-- CreateTable: episode_due_dates
|
||||
CREATE TABLE "episode_due_dates" (
|
||||
"id" TEXT NOT NULL,
|
||||
"projectId" TEXT NOT NULL,
|
||||
"episode" TEXT NOT NULL,
|
||||
"dueDate" TIMESTAMP(3) NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "episode_due_dates_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "episode_due_dates_projectId_episode_key" ON "episode_due_dates"("projectId", "episode");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "episode_due_dates" ADD CONSTRAINT "episode_due_dates_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
+24
-8
@@ -239,18 +239,33 @@ model Project {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
client Client? @relation(fields: [clientId], references: [id])
|
||||
producer User? @relation("ProducerProjects", fields: [producerId], references: [id])
|
||||
supervisor User? @relation("SupervisorProjects", fields: [supervisorId], references: [id])
|
||||
shots Shot[]
|
||||
assets Asset[]
|
||||
tasks Task[]
|
||||
shotGroups ShotGroup[]
|
||||
reviewSessions ReviewSession[]
|
||||
client Client? @relation(fields: [clientId], references: [id])
|
||||
producer User? @relation("ProducerProjects", fields: [producerId], references: [id])
|
||||
supervisor User? @relation("SupervisorProjects", fields: [supervisorId], references: [id])
|
||||
shots Shot[]
|
||||
assets Asset[]
|
||||
tasks Task[]
|
||||
shotGroups ShotGroup[]
|
||||
reviewSessions ReviewSession[]
|
||||
episodeDueDates EpisodeDueDate[]
|
||||
|
||||
@@map("projects")
|
||||
}
|
||||
|
||||
model EpisodeDueDate {
|
||||
id String @id @default(cuid())
|
||||
projectId String
|
||||
episode String
|
||||
dueDate DateTime
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([projectId, episode])
|
||||
@@map("episode_due_dates")
|
||||
}
|
||||
|
||||
model Shot {
|
||||
id String @id @default(cuid())
|
||||
shotCode String
|
||||
@@ -259,6 +274,7 @@ model Shot {
|
||||
shotNumber Int @default(0)
|
||||
sequence String?
|
||||
description String? @db.Text
|
||||
notes String? @db.Text
|
||||
status ShotStatus @default(WAITING)
|
||||
priority ShotPriority @default(NORMAL)
|
||||
artistId String?
|
||||
|
||||
Reference in New Issue
Block a user