feat(editor): ✨ Restore published version button
Had to migrate webhooks into a standalone table
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Webhook" (
|
||||
"id" TEXT NOT NULL,
|
||||
"url" TEXT,
|
||||
"method" TEXT NOT NULL,
|
||||
"queryParams" JSONB[],
|
||||
"headers" JSONB[],
|
||||
"body" TEXT,
|
||||
"typebotId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "Webhook_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Webhook" ADD CONSTRAINT "Webhook_typebotId_fkey" FOREIGN KEY ("typebotId") REFERENCES "Typebot"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
@ -129,6 +129,7 @@ model Typebot {
|
||||
customDomain String? @unique
|
||||
collaborators CollaboratorsOnTypebots[]
|
||||
invitations Invitation[]
|
||||
webhooks Webhook[]
|
||||
|
||||
@@unique([id, ownerId])
|
||||
}
|
||||
@ -202,3 +203,14 @@ model Coupon {
|
||||
code String @id @unique
|
||||
dateRedeemed DateTime?
|
||||
}
|
||||
|
||||
model Webhook {
|
||||
id String @id @default(cuid())
|
||||
url String?
|
||||
method String
|
||||
queryParams Json[]
|
||||
headers Json[]
|
||||
body String?
|
||||
typebotId String
|
||||
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
Reference in New Issue
Block a user