diff --git a/prisma/migrations/20240616203120_add_survey_table/migration.sql b/prisma/migrations/20240616203120_add_survey_table/migration.sql index 5cf6b56..e2bc703 100644 --- a/prisma/migrations/20240616203120_add_survey_table/migration.sql +++ b/prisma/migrations/20240616203120_add_survey_table/migration.sql @@ -19,4 +19,4 @@ CREATE TABLE `Survey` ( -- AddForeignKey ALTER TABLE `Message` -ADD CONSTRAINT `Message_surveyId_fkey` FOREIGN KEY (`surveyId`) REFERENCES `Survey` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; \ No newline at end of file +ADD CONSTRAINT `Message_surveyId_fkey` FOREIGN KEY (`surveyId`) REFERENCES `Survey` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file diff --git a/prisma/migrations/20240617043350_cascade_delete_messages/migration.sql b/prisma/migrations/20240617043350_cascade_delete_messages/migration.sql deleted file mode 100644 index bd04481..0000000 --- a/prisma/migrations/20240617043350_cascade_delete_messages/migration.sql +++ /dev/null @@ -1,6 +0,0 @@ --- 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; \ No newline at end of file