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

10 lines
306 B
SQL

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;