salix/db/versions/10738-greenCordyline/00-addFieldToTravel.sql

10 lines
306 B
MySQL
Raw Normal View History

2024-01-25 16:33:54 +00:00
ALTER TABLE vn.travel DROP FOREIGN KEY IF EXISTS travel_FK_1 ;
ALTER TABLE vn.travel DROP COLUMN IF EXISTS awbFk;
ALTER TABLE vn.travel
ADD awbFk SMALLINT(11) UNSIGNED;
ALTER TABLE vn.travel
ADD CONSTRAINT travel_FK_1 FOREIGN KEY (awbFk) REFERENCES vn.awb(id)
ON DELETE CASCADE ON UPDATE CASCADE;