salix/db/versions/.archive/10661-crimsonIvy/00-firstScript.sql

4 lines
274 B
SQL

-- Place your SQL code here
ALTER TABLE vn.itemShelving ADD buyFk int(11) NULL;
ALTER TABLE vn.itemShelving ADD CONSTRAINT itemShelvingBuy_FK FOREIGN KEY (buyFk) REFERENCES vn.buy(id);
ALTER TABLE vn.itemShelving ADD CONSTRAINT itemShelving_UN UNIQUE KEY (buyFk,shelvingFk);