feat: delete questions from frontpage on deletion
This commit is contained in:
parent
ceeeff9681
commit
00615c1e63
|
@ -0,0 +1,5 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "FrontpageId" DROP CONSTRAINT "FrontpageId_id_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "FrontpageId" ADD CONSTRAINT "FrontpageId_id_fkey" FOREIGN KEY ("id") REFERENCES "questions"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -90,6 +90,6 @@ model History {
|
|||
}
|
||||
|
||||
model FrontpageId {
|
||||
question Question @relation(fields: [id], references: [id])
|
||||
question Question @relation(fields: [id], references: [id], onDelete: Cascade)
|
||||
id String @unique
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user