salix/db/versions/.archive/10685-blueMedeola/00-firstScript.sql

24 lines
894 B
MySQL
Raw Permalink Normal View History

-- Place your SQL code here
ALTER TABLE vn.clientContact
ADD CONSTRAINT clientContact_FK FOREIGN KEY (clientFk) REFERENCES vn.client(id)
ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.clientSample MODIFY COLUMN clientFk int(11) NOT NULL;
ALTER TABLE vn.clientSample
ADD CONSTRAINT clientSample_FK FOREIGN KEY (clientFk) REFERENCES vn.client(id)
ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.greuge MODIFY COLUMN clientFk int(11) NOT NULL;
ALTER TABLE vn.greuge
ADD CONSTRAINT greuge_FK_1 FOREIGN KEY (clientFk) REFERENCES vn.client(id)
ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.supplierAddress MODIFY COLUMN supplierFk int(10) UNSIGNED DEFAULT NULL NULL;
-- poner unsigned
ALTER TABLE vn.supplierAddress
ADD CONSTRAINT supplierAddress_FK FOREIGN KEY (supplierFk) REFERENCES vn.supplier(id)
ON DELETE CASCADE ON UPDATE CASCADE;