From c1ca2af9f9e4166de60b8601510e4b6381123732 Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Thu, 2 Nov 2017 17:06:37 +0100 Subject: [PATCH] Update DataManagementPlanDB.sql --- dmp-db-scema/DataManagementPlanDB.sql | 66 +++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/dmp-db-scema/DataManagementPlanDB.sql b/dmp-db-scema/DataManagementPlanDB.sql index ee6bd6e4b..b7c54b14f 100644 --- a/dmp-db-scema/DataManagementPlanDB.sql +++ b/dmp-db-scema/DataManagementPlanDB.sql @@ -50,9 +50,9 @@ CREATE TABLE "DMP" ( "Version" integer NOT NULL, "Project" uuid NOT NULL, "ProfileData" xml, - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Profile" uuid ); @@ -83,9 +83,9 @@ COMMENT ON COLUMN "DMPOrganisation"."Role" IS 'Enumerator of roles'; CREATE TABLE "DMPProfile" ( "ID" uuid DEFAULT uuid_generate_v4() NOT NULL, "Label" character varying(250) NOT NULL, - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -115,9 +115,9 @@ CREATE TABLE "Dataset" ( "Uri" character varying(250), "Properties" xml, "Reference" xml, - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Profile" uuid ); @@ -136,9 +136,9 @@ CREATE TABLE "DatasetProfile" ( "Label" character varying(250) NOT NULL, "Ruleset" uuid, "Viewstyle" uuid, - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml NOT NULL ); @@ -180,9 +180,9 @@ CREATE TABLE "Organisation" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -211,11 +211,11 @@ CREATE TABLE "Project" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, - "StartDate" date, - "EndDate" date, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), + "StartDate" timestamp, + "EndDate" timestamp, "Definition" xml ); @@ -254,9 +254,9 @@ CREATE TABLE "Researcher" ( "Uri" character varying(250), "PrimaryEmail" character varying(250), "Definition" xml, - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Reference" xml ); @@ -378,9 +378,9 @@ CREATE TABLE "Service" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -396,9 +396,9 @@ CREATE TABLE "DataRepository" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -415,9 +415,9 @@ CREATE TABLE "Registry" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), - "Status" smallint, - "Created" timestamp with time zone, - "Modified" timestamp with time zone, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -495,7 +495,7 @@ CREATE TABLE "UserInfo" ( "authentication" uuid, "verified_email" boolean, "name" character varying(250), - "created" timestamp, + "created" timestamp not null, "lastloggedin" timestamp, "additionalinfo" xml, PRIMARY KEY (id)