Merge pull request 'fix(sql): refs #6005 fix fk formation' (!2294) from 6005-fixsql into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2294
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
This commit is contained in:
Pablo Natek 2024-04-12 09:01:30 +00:00
commit f2fc9d09d5
1 changed files with 1 additions and 1 deletions

View File

@ -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`.`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` 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` 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; ALTER TABLE `vn`.`sector` ADD CONSTRAINT `sector_FK` FOREIGN KEY IF NOT EXISTS (mainPrinterFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;