fix: refs #7986 create fk

This commit is contained in:
Carlos Satorres 2024-10-08 08:36:17 +02:00
parent ed4dff1914
commit b4dc5276dd
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
ALTER TABLE `vn`.`worker`
ADD COLUMN `motoFk` INT(11) UNSIGNED DEFAULT NULL;
ALTER TABLE `vn`.`worker`
ADD CONSTRAINT `worker_machineFk` FOREIGN KEY (`motoFk`) REFERENCES `machine` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;