From 3aceac3d346f6459af56f4f409bcf8b300a3fd55 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Tue, 29 Sep 2020 00:10:29 +0200 Subject: [PATCH] Don't delete works and recordings when updating persons --- migrations/2020-09-27-201047_initial_schema/up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/2020-09-27-201047_initial_schema/up.sql b/migrations/2020-09-27-201047_initial_schema/up.sql index 77f65f4..abad205 100644 --- a/migrations/2020-09-27-201047_initial_schema/up.sql +++ b/migrations/2020-09-27-201047_initial_schema/up.sql @@ -11,7 +11,7 @@ CREATE TABLE instruments ( CREATE TABLE works ( id BIGINT NOT NULL PRIMARY KEY, - composer BIGINT NOT NULL REFERENCES persons(id) ON DELETE CASCADE, + composer BIGINT NOT NULL REFERENCES persons(id), title TEXT NOT NULL ); @@ -49,7 +49,7 @@ CREATE TABLE ensembles ( CREATE TABLE recordings ( id BIGINT NOT NULL PRIMARY KEY, - work BIGINT NOT NULL REFERENCES works(id) ON DELETE CASCADE, + work BIGINT NOT NULL REFERENCES works(id), comment TEXT NOT NULL );