SQL scripts for "Project" entity creation.

This commit is contained in:
gkolokythas 2019-08-01 12:13:44 +03:00
parent 37ec020231
commit 875150f7a8
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,2 @@
ALTER TABLE public."DMP"
ADD COLUMN "Project" uuid

View File

@ -0,0 +1,27 @@
CREATE TABLE public."Project"
(
"ID" uuid NOT NULL DEFAULT uuid_generate_v4(),
"Label" character varying(250) COLLATE pg_catalog."default" NOT NULL,
"Abbreviation" character varying(50) COLLATE pg_catalog."default",
"Reference" character varying COLLATE pg_catalog."default",
"Uri" character varying(250) COLLATE pg_catalog."default",
"Definition" character varying COLLATE pg_catalog."default",
"Status" smallint NOT NULL DEFAULT 0,
"Created" timestamp(4) with time zone NOT NULL DEFAULT now(),
"Modified" timestamp(4) with time zone NOT NULL DEFAULT now(),
"StartDate" timestamp(4) with time zone,
"EndDate" timestamp(4) with time zone,
"Description" text COLLATE pg_catalog."default",
"CreationUser" uuid,
"Type" numeric NOT NULL DEFAULT 0,
"Content" uuid,
CONSTRAINT "Project_pkey" PRIMARY KEY ("ID"),
CONSTRAINT fk_project_content FOREIGN KEY ("Content")
REFERENCES public."Content" ("Id") MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION,
CONSTRAINT fk_project_creator FOREIGN KEY ("CreationUser")
REFERENCES public."UserInfo" (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)