diff --git a/db/versions/11411-turquoiseEucalyptus/00-agencyIncomingForeign.sql b/db/versions/11411-turquoiseEucalyptus/00-agencyIncomingForeign.sql index 7d8f44040..829236a2a 100644 --- a/db/versions/11411-turquoiseEucalyptus/00-agencyIncomingForeign.sql +++ b/db/versions/11411-turquoiseEucalyptus/00-agencyIncomingForeign.sql @@ -1,5 +1,3 @@ -USE vn; - DELETE ai from `vn`.`agencyIncoming` ai LEFT JOIN `vn`.`agencyMode` am ON @@ -9,6 +7,6 @@ DELETE ai from ALTER TABLE `vn`.`agencyIncoming` ADD CONSTRAINT `fk_agencyIncoming_agencyMode` FOREIGN KEY (`agencyModeFk`) - REFERENCES `vn`.`agencyMode`(`id`) + REFERENCES `agencyMode`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;