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;