Uniquely index event-type with teamId and slug (#2452)

This commit is contained in:
Afzal Sayed 2022-04-20 06:05:12 +05:30 committed by GitHub
parent 8f3b854559
commit 00a3ff89e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,9 @@
/*
Warnings:
- A unique constraint covering the columns `[teamId,slug]` on the table `EventType` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "EventType_teamId_slug_key" ON "EventType"("teamId", "slug");

View File

@ -72,6 +72,7 @@ model EventType {
successRedirectUrl String?
@@unique([userId, slug])
@@unique([teamId, slug])
}
model Credential {