add unique constraint on appointments
This commit is contained in:
parent
e9f3fb7e9c
commit
d244158c4e
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[user_uid,choice,status]` on the table `appointments` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "appointments_user_uid_choice_status_key" ON "appointments"("user_uid", "choice", "status");
|
@ -297,6 +297,7 @@ model Appointments {
|
||||
status EAppointmentStatus @default(OPEN)
|
||||
votes Votes[]
|
||||
|
||||
@@unique([user_uid, choice, status])
|
||||
@@map("appointments")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user