2
0

🐛 Remove delete result cascade

This commit is contained in:
Baptiste Arnaud
2022-09-25 20:16:08 +02:00
committed by Baptiste Arnaud
parent 30dff2d5d7
commit 3c803b1345
11 changed files with 396 additions and 180 deletions

View File

@ -0,0 +1,5 @@
-- DropForeignKey
ALTER TABLE "Result" DROP CONSTRAINT "Result_typebotId_fkey";
-- AddForeignKey
ALTER TABLE "Result" ADD CONSTRAINT "Result_typebotId_fkey" FOREIGN KEY ("typebotId") REFERENCES "Typebot"("id") ON DELETE NO ACTION ON UPDATE CASCADE;

View File

@ -212,7 +212,7 @@ model Result {
isCompleted Boolean
hasStarted Boolean?
isArchived Boolean?
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: NoAction)
answers Answer[]
logs Log[]
}