salix/db/versions/10813-salmonChico/00-firstScript.sql

3 lines
214 B
SQL

ALTER TABLE vn.entryObservation DROP FOREIGN KEY entry_id_entryFk;
ALTER TABLE vn.entryObservation ADD CONSTRAINT entry_id_entryFk FOREIGN KEY (entryFk) REFERENCES vn.entry(id) ON DELETE CASCADE ON UPDATE CASCADE;