From f08e2e47b74d23529b0669f81eb8800085e27f04 Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Fri, 2 Aug 2019 10:25:54 +0300 Subject: [PATCH] SQL scripts for new "Funder" entity. (Issue #145) --- .../updates/Funder-entity-create/Funder-create.sql | 12 ++++++++++++ .../Funder-entity-create/Grant-add-column-Funder.sql | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 dmp-db-scema/updates/Funder-entity-create/Funder-create.sql create mode 100644 dmp-db-scema/updates/Funder-entity-create/Grant-add-column-Funder.sql diff --git a/dmp-db-scema/updates/Funder-entity-create/Funder-create.sql b/dmp-db-scema/updates/Funder-entity-create/Funder-create.sql new file mode 100644 index 000000000..b6766b7f7 --- /dev/null +++ b/dmp-db-scema/updates/Funder-entity-create/Funder-create.sql @@ -0,0 +1,12 @@ +CREATE TABLE public."Funder" +( + "ID" uuid NOT NULL DEFAULT uuid_generate_v4(), + "Label" character varying(250) COLLATE pg_catalog."default" NOT NULL, + "Reference" character varying 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(), + "Type" numeric NOT NULL DEFAULT 0, + CONSTRAINT "Funder_pkey" PRIMARY KEY ("ID") +) \ No newline at end of file diff --git a/dmp-db-scema/updates/Funder-entity-create/Grant-add-column-Funder.sql b/dmp-db-scema/updates/Funder-entity-create/Grant-add-column-Funder.sql new file mode 100644 index 000000000..d3a4d93d2 --- /dev/null +++ b/dmp-db-scema/updates/Funder-entity-create/Grant-add-column-Funder.sql @@ -0,0 +1,2 @@ +ALTER TABLE "Grant" +ADD COLUMN "Funder" uuid \ No newline at end of file