mirror of https://github.com/xfarrow/blink
24 lines
847 B
MySQL
24 lines
847 B
MySQL
|
-- 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;
|