From 50bbe7d02a99c94a278fc14294296634a4128708 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Mon, 17 Jun 2024 22:48:12 +0300 Subject: [PATCH] fix migration (merge) --- .../20240616203120_add_survey_table/migration.sql | 2 +- .../20240617043350_cascade_delete_messages/migration.sql | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 prisma/migrations/20240617043350_cascade_delete_messages/migration.sql 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