From 0d03cf76b4f69716fb2c2ae5a715d52b4a571621 Mon Sep 17 00:00:00 2001 From: pablone Date: Fri, 12 Apr 2024 10:17:04 +0200 Subject: [PATCH] fix(sql): refs #6005 fix fk formation --- db/versions/10895-pinkArborvitae/01-secondScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/10895-pinkArborvitae/01-secondScript.sql b/db/versions/10895-pinkArborvitae/01-secondScript.sql index 4397bcf01..03f1aeccb 100644 --- a/db/versions/10895-pinkArborvitae/01-secondScript.sql +++ b/db/versions/10895-pinkArborvitae/01-secondScript.sql @@ -16,7 +16,7 @@ ALTER TABLE `vn`.`packingSite` MODIFY COLUMN IF EXISTS `printerRfidFk` int unsig ALTER TABLE `vn`.`packingSite` ADD CONSTRAINT `packingSite_FK_4` FOREIGN KEY IF NOT EXISTS(printerRfidFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE; ALTER TABLE `vn`.`printQueue` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT NULL NULL; -ALTER TABLE `vn`.`printQueue` ADD CONSTRAINT `printQueue_FK` FOREIGN KEY IF NOT EXISTS (id) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE `vn`.`printQueue` ADD CONSTRAINT `printQueue_FK` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE; ALTER TABLE `vn`.`sector` MODIFY COLUMN IF EXISTS `mainPrinterFk` int unsigned DEFAULT NULL NULL; ALTER TABLE `vn`.`sector` ADD CONSTRAINT `sector_FK` FOREIGN KEY IF NOT EXISTS (mainPrinterFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE; -- 2.40.1