This commit is contained in:
xfarrow
2023-10-12 12:23:18 +02:00
parent 711e6d210a
commit e36091bb05
6 changed files with 116 additions and 0 deletions

View File

@ -0,0 +1,24 @@
-- Table: public.OrganizationAdministrator
-- DROP TABLE IF EXISTS public."OrganizationAdministrator";
CREATE TABLE IF NOT EXISTS public."OrganizationAdministrator"
(
id_person integer NOT NULL,
id_organization integer NOT NULL,
CONSTRAINT "OrganizationAdministrator_pkey" PRIMARY KEY (id_organization, id_person),
CONSTRAINT "OrganizationAdministratorOrganizationId" FOREIGN KEY (id_organization)
REFERENCES public."Organization" (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
NOT VALID,
CONSTRAINT "OrganizationAdministratorUserId" FOREIGN KEY (id_person)
REFERENCES public."Person" (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public."OrganizationAdministrator"
OWNER to pg_database_owner;