mirror of
https://github.com/SrIzan10/fireentity-movienights.git
synced 2026-06-06 00:56:52 +00:00
more thn one movie
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- A unique constraint covering the columns `[movieId,date]` on the table `MovieSchedule` will be added. If there are existing duplicate values, this will fail.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX "public"."MovieSchedule_date_key";
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "MovieSchedule_movieId_date_key" ON "public"."MovieSchedule"("movieId", "date");
|
||||||
@@ -86,10 +86,12 @@ model Movie {
|
|||||||
model MovieSchedule {
|
model MovieSchedule {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
movieId String
|
movieId String
|
||||||
date DateTime @unique
|
date DateTime
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
movie Movie @relation(fields: [movieId], references: [id], onDelete: Cascade)
|
movie Movie @relation(fields: [movieId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
|
@@unique([movieId, date])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Vote {
|
model Vote {
|
||||||
|
|||||||
Reference in New Issue
Block a user