-- Place your SQL code here
ALTER TABLE vn.operator ADD IF NOT EXISTS trainFk INT DEFAULT 1 NOT NULL;
ALTER TABLE vn.operator ADD IF NOT EXISTS itemPackingTypeFk VARCHAR(1) NULL;
ALTER TABLE vn.operator ADD IF NOT EXISTS warehouseFk SMALLINT(6) UNSIGNED DEFAULT 60 NOT NULL;
ALTER TABLE vn.operator ADD CONSTRAINT operator_FK_1 FOREIGN KEY (trainFk) REFERENCES vn.train(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE vn.operator ADD CONSTRAINT operator_FK_2 FOREIGN KEY (itemPackingTypeFk) REFERENCES vn.itemPackingType(code) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.operator ADD CONSTRAINT operator_FK_3 FOREIGN KEY (warehouseFk) REFERENCES vn.warehouse(id) ON DELETE CASCADE ON UPDATE CASCADE;
