Updated DataManagementPlanDB.sql

This commit is contained in:
Nikolaos Laskaris 2017-09-28 11:10:20 +02:00
parent fab68cf147
commit 7b1f3b5a9c
1 changed files with 17 additions and 2 deletions

View File

@ -1,4 +1,3 @@
SET statement_timeout = 0; SET statement_timeout = 0;
SET lock_timeout = 0; SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0; SET idle_in_transaction_session_timeout = 0;
@ -26,6 +25,7 @@ drop table if exists "Registry" cascade;
drop table if exists "DatasetService" cascade; drop table if exists "DatasetService" cascade;
drop table if exists "DatasetRegistry" cascade; drop table if exists "DatasetRegistry" cascade;
drop table if exists "DatasetDataRepository" cascade; drop table if exists "DatasetDataRepository" cascade;
drop table if exists "UserInfo" cascade;
-- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
@ -420,12 +420,12 @@ CREATE TABLE "DatasetDataRepository" (
"ID" uuid DEFAULT uuid_generate_v4() NOT NULL "ID" uuid DEFAULT uuid_generate_v4() NOT NULL
); );
ALTER TABLE "DatasetDataRepository" OWNER TO dmptool; ALTER TABLE "DatasetDataRepository" OWNER TO dmptool;
COMMENT ON TABLE "DatasetDataRepository" IS 'Linking Dataset to DataRepository'; COMMENT ON TABLE "DatasetDataRepository" IS 'Linking Dataset to DataRepository';
ALTER TABLE ONLY "DatasetDataRepository" ALTER TABLE ONLY "DatasetDataRepository"
ADD CONSTRAINT "DatasetDataRepositoryDatasetReference" FOREIGN KEY ("Dataset") REFERENCES "Dataset"("ID"); ADD CONSTRAINT "DatasetDataRepositoryDatasetReference" FOREIGN KEY ("Dataset") REFERENCES "Dataset"("ID");
@ -447,6 +447,21 @@ ALTER TABLE ONLY "DatasetService"
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID"); ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID");
CREATE TABLE "UserInfo" (
"autoid" uuid DEFAULT uuid_generate_v4() NOT NULL,
"id" character varying(500),
"email" character varying(250),
"emailIsVerified" boolean,
"name" character varying(250),
"pictureUrl" character varying(500),
"locale" character varying(50),
"familyName" character varying(250),
"givenName" character varying(250),
"additionalinfo" xml,
PRIMARY KEY (id, email)
);
REVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres; REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO postgres;