Fix foreign key constraints for updates

This commit is contained in:
Elias Projahn 2020-10-10 09:58:38 +02:00
parent 78c1c3e540
commit d8247d1361
2 changed files with 85 additions and 60 deletions

View file

@ -56,7 +56,7 @@ CREATE TABLE recordings (
CREATE TABLE performances (
id BIGINT NOT NULL PRIMARY KEY,
recording BIGINT NOT NULL REFERENCES recordings(id) ON DELETE CASCADE,
person BIGINT REFERENCES persons(id) ON DELETE CASCADE,
ensemble BIGINT REFERENCES ensembles(id) ON DELETE CASCADE,
person BIGINT REFERENCES persons(id),
ensemble BIGINT REFERENCES ensembles(id),
role BIGINT REFERENCES instruments(id)
);