salix/db/versions/.archive/10616-yellowIvy/01-firstScript.sql

9 lines
272 B
SQL

ALTER TABLE vn.property ADD IF NOT EXISTS supplierFk int(10) unsigned NULL;
ALTER TABLE vn.property
ADD CONSTRAINT propertySupplierFk
FOREIGN KEY IF NOT EXISTS (supplierFk)
REFERENCES vn.supplier(id)
ON DELETE RESTRICT
ON UPDATE CASCADE;