fix: 🛂 Protect from others to consult typebots and folders
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[code]` on the table `Coupon` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[id,ownerId]` on the table `DashboardFolder` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[id,ownerId]` on the table `Typebot` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Coupon_code_key" ON "Coupon"("code");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "DashboardFolder_id_ownerId_key" ON "DashboardFolder"("id", "ownerId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Typebot_id_ownerId_key" ON "Typebot"("id", "ownerId");
|
@ -96,6 +96,7 @@ model DashboardFolder {
|
||||
parentFolder DashboardFolder? @relation("ParentChild", fields: [parentFolderId], references: [id])
|
||||
childrenFolder DashboardFolder[] @relation("ParentChild")
|
||||
typebots Typebot[]
|
||||
@@unique([id, ownerId])
|
||||
}
|
||||
|
||||
model Typebot {
|
||||
@ -117,6 +118,7 @@ model Typebot {
|
||||
settings Json
|
||||
publicId String? @unique
|
||||
customDomain String? @unique
|
||||
@@unique([id, ownerId])
|
||||
}
|
||||
|
||||
model PublicTypebot {
|
||||
@ -157,6 +159,6 @@ model Answer {
|
||||
|
||||
model Coupon {
|
||||
userPropertiesToUpdate Json
|
||||
code String @id
|
||||
code String @id @unique
|
||||
dateRedeemed DateTime?
|
||||
}
|
||||
|
Reference in New Issue
Block a user