schema/mysql: fix import source constraints

This commit is contained in:
Thomas Gelf 2015-11-06 09:05:08 +01:00
parent f18e1b6a5f
commit 2706af6976
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,7 @@
ALTER TABLE import_run DROP FOREIGN KEY import_run_source;
ALTER TABLE import_run ADD CONSTRAINT import_run_source
FOREIGN KEY import_source (source_id)
REFERENCES import_source (id)
ON DELETE CASCADE
ON UPDATE RESTRICT;

View File

@ -877,8 +877,8 @@ CREATE TABLE import_run (
CONSTRAINT import_run_source
FOREIGN KEY import_source (source_id)
REFERENCES import_source (id)
ON DELETE RESTRICT
ON UPDATE CASCADE,
ON DELETE CASCADE
ON UPDATE RESTRICT,
CONSTRAINT import_run_rowset
FOREIGN KEY rowset (rowset_checksum)
REFERENCES imported_rowset (checksum)