salix/db/versions/.archive/10402-orangeTulip/00-firstScript.sql

6 lines
441 B
SQL

ALTER TABLE vn.workerJourney DROP FOREIGN KEY workerJourney_businessFk;
ALTER TABLE vn.workerJourney ADD CONSTRAINT workerJourney_businessFk FOREIGN KEY (businessFk) REFERENCES vn.business(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.calendar DROP FOREIGN KEY calendar_businessFk;
ALTER TABLE vn.calendar ADD CONSTRAINT calendar_businessFk FOREIGN KEY (businessFk) REFERENCES vn.business(id) ON DELETE CASCADE ON UPDATE CASCADE;