From 91eb4d4b568d8390221a27b1ca595beae60caf8c Mon Sep 17 00:00:00 2001 From: xfarrow Date: Fri, 16 Feb 2024 21:28:10 +0100 Subject: [PATCH] .sql fix --- backend/sql/4-create_organization_post.sql | 2 +- backend/sql/5-create_organization_administrator.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/sql/4-create_organization_post.sql b/backend/sql/4-create_organization_post.sql index 013aa7f..4a24677 100644 --- a/backend/sql/4-create_organization_post.sql +++ b/backend/sql/4-create_organization_post.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS public."OrganizationPost" CONSTRAINT "AuthorIdFK" FOREIGN KEY (original_author) REFERENCES public."Person" (id) MATCH SIMPLE ON UPDATE NO ACTION - ON DELETE NO ACTION + ON DELETE CASCADE NOT VALID, CONSTRAINT "OrganizationIdFk" FOREIGN KEY (organization_id) REFERENCES public."Organization" (id) MATCH SIMPLE diff --git a/backend/sql/5-create_organization_administrator.sql b/backend/sql/5-create_organization_administrator.sql index a98a5b5..48caff4 100644 --- a/backend/sql/5-create_organization_administrator.sql +++ b/backend/sql/5-create_organization_administrator.sql @@ -10,12 +10,12 @@ CREATE TABLE IF NOT EXISTS public."OrganizationAdministrator" CONSTRAINT "OrganizationAdministratorOrganizationId" FOREIGN KEY (id_organization) REFERENCES public."Organization" (id) MATCH SIMPLE ON UPDATE NO ACTION - ON DELETE NO ACTION + ON DELETE CASCADE NOT VALID, CONSTRAINT "OrganizationAdministratorUserId" FOREIGN KEY (id_person) REFERENCES public."Person" (id) MATCH SIMPLE ON UPDATE NO ACTION - ON DELETE NO ACTION + ON DELETE CASCADE ) TABLESPACE pg_default;