Made category optional on Snippet table

This commit is contained in:
Florian Sylvain committed 2023-02-01 23:40:17 +01:00
1 parent cd62075dc2
commit b1f126b674
2 files changed
+10 -2

No files matched your search

@@ -0,0 +1,8 @@
-- DropForeignKey
ALTER TABLE `Snippet` DROP FOREIGN KEY `Snippet_category_id_fkey`;
-- AlterTable
ALTER TABLE `Snippet` MODIFY `category_id` INTEGER NULL;
-- AddForeignKey
ALTER TABLE `Snippet` ADD CONSTRAINT `Snippet_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `Category`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;