prevent from save doubled subscriber url (#3811)

Co-authored-by: Adam Garbowski <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-08-31 03:41:23 +00:00
1 parent 0c8847fb87
commit b151ccd4c6
5 files changed
+24

No files matched your search

@@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[userId,subscriberUrl]` on the table `Webhook` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Webhook_userId_subscriberUrl_key" ON "Webhook"("userId", "subscriberUrl");
+2
View File
@@ -407,6 +407,8 @@ model Webhook {
app App? @relation(fields: [appId], references: [slug], onDelete: Cascade)
appId String?
secret String?
@@unique([userId, subscriberUrl], name: "courseIdentifier")
}
model Impersonations {