salix/services/db/install/changes/1.2-CHECK/21-businesLabourFGN.sql

14 lines
419 B
SQL

ALTER TABLE `postgresql`.`business_labour`
DROP FOREIGN KEY `business_labour_department`;
ALTER TABLE `postgresql`.`business_labour`
ADD INDEX `business_labour_department_idx` (`department_id` ASC);
ALTER TABLE `postgresql`.`business_labour`
ADD CONSTRAINT `business_labour_department`
FOREIGN KEY (`department_id`)
REFERENCES `vn2008`.`department` (`department_id`)
ON DELETE SET NULL
ON UPDATE CASCADE;