salix/db/changes/10091-iberflora/00-route.sql

11 lines
274 B
SQL

ALTER TABLE `vn`.`route`
ADD COLUMN `zoneFk` INT NULL AFTER `description`,
ADD INDEX `fk_route_1_idx` (`zoneFk` ASC);
;
ALTER TABLE `vn`.`route`
ADD CONSTRAINT `fk_route_1`
FOREIGN KEY (`zoneFk`)
REFERENCES `vn`.`zone` (`id`)
ON DELETE RESTRICT
ON UPDATE CASCADE;