new survey page

This commit is contained in:
Dobromir Popov
2024-06-17 08:01:51 +03:00
parent 8ca2000ee4
commit 4da00d4ec3
8 changed files with 255 additions and 4 deletions

View File

@ -0,0 +1,5 @@
-- DropForeignKey
ALTER TABLE `message` DROP FOREIGN KEY `Message_surveyId_fkey`;
-- AddForeignKey
ALTER TABLE `Message` ADD CONSTRAINT `Message_surveyId_fkey` FOREIGN KEY (`surveyId`) REFERENCES `Survey`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -287,7 +287,7 @@ model Message {
answer String?
answerDate DateTime?
Survey Survey? @relation(fields: [surveyId], references: [id])
Survey Survey? @relation(fields: [surveyId], references: [id], onDelete: Cascade)
surveyId Int?
}