Loading dmp-db-scema/main/data-dump.sql +1 −1 Original line number Diff line number Diff line Loading @@ -14,4 +14,4 @@ INSERT INTO public."DoiFunder"(name, doi) VALUES ('National Science Foundation', INSERT INTO public."DoiFunder"(name, doi) VALUES ('Nederlandse Organisatie voor Wetenschappelijk Onderzoek', '10.13039/501100003246'); INSERT INTO public."DoiFunder"(name, doi) VALUES ('Wellcome Trust', '10.13039/100004440'); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.002', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder'); No newline at end of file INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.003', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder'); No newline at end of file dmp-db-scema/updates/09/01_create_user_association.sql→dmp-db-scema/updates/00.00.002_create_user_association.sql +0 −0 File moved. View file dmp-db-scema/updates/09/02_doifunder.sql→dmp-db-scema/updates/00.00.003_doifunder.sql +2 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,7 @@ INSERT INTO public."DoiFunder"(name, doi) VALUES ('National Science Foundation', INSERT INTO public."DoiFunder"(name, doi) VALUES ('Nederlandse Organisatie voor Wetenschappelijk Onderzoek', '10.13039/501100003246'); INSERT INTO public."DoiFunder"(name, doi) VALUES ('Wellcome Trust', '10.13039/100004440'); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.003', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder'); dmp-db-scema/updates/01/01_DMPUser_DMPDatasetprofile_DMPFinalizedDate.sqldeleted 100644 → 0 +0 −61 Original line number Diff line number Diff line INSERT INTO public."UserDMP"( usr, dmp, role) SELECT "Creator", "ID", 0 FROM public."DMP"; DELETE FROM public."UserDMP" as us1 using public."UserDMP" as us2 where us1."id" < us2."id" AND us1."dmp" = us2."dmp"; CREATE TABLE public."DMPDatasetProfile" ( "ID" uuid NOT NULL DEFAULT uuid_generate_v4(), dmp uuid NOT NULL, datasetprofile uuid NOT NULL, CONSTRAINT "DMPDatasetProfile_pkey" PRIMARY KEY ("ID"), CONSTRAINT "DMPDatasetProfile_datasetprofile_fkey" FOREIGN KEY (datasetprofile) REFERENCES public."DatasetProfile" ("ID") MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT "DMPDatasetProfile_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."DMP" ("ID") MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public."DMPDatasetProfile" -- OWNER to dmtadm; OWNER to :POSTGRES_USER; ALTER TABLE public."UserDMP" -- OWNER to dmtadm; OWNER to :POSTGRES_USER; --INSERT INTO public."DMPDatasetProfile"( -- dmp, datasetprofile) -- SELECT "ID", unnest(xpath('/profiles/profile/@profileId', dmpp."AssociatedDmps"::xml)::text[]::UUID[]) -- FROM public."DMP" as dmpp; ALTER TABLE public."DMP" ADD "FinalizedDat" timestamp(6) WITH time zone; UPDATE public."DMP" SET "FinalizedDat" = "Modified" WHERE "Status" = 1; ALTER TABLE public."Dataset" ADD "FinalizedDat" timestamp(6) WITH time zone; UPDATE public."Dataset" SET "FinalizedDat" = "Modified" WHERE "Status" = 1; dmp-db-scema/updates/01/03_DMPisPublic.sqldeleted 100644 → 0 +0 −7 Original line number Diff line number Diff line alter table public."DMP" Add "isPublic" boolean NOT NULL Default False; UPDATE public."DMP" SET "isPublic" = True WHERE "Status" = 1; No newline at end of file Loading
dmp-db-scema/main/data-dump.sql +1 −1 Original line number Diff line number Diff line Loading @@ -14,4 +14,4 @@ INSERT INTO public."DoiFunder"(name, doi) VALUES ('National Science Foundation', INSERT INTO public."DoiFunder"(name, doi) VALUES ('Nederlandse Organisatie voor Wetenschappelijk Onderzoek', '10.13039/501100003246'); INSERT INTO public."DoiFunder"(name, doi) VALUES ('Wellcome Trust', '10.13039/100004440'); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.002', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder'); No newline at end of file INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.003', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder'); No newline at end of file
dmp-db-scema/updates/09/01_create_user_association.sql→dmp-db-scema/updates/00.00.002_create_user_association.sql +0 −0 File moved. View file
dmp-db-scema/updates/09/02_doifunder.sql→dmp-db-scema/updates/00.00.003_doifunder.sql +2 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,7 @@ INSERT INTO public."DoiFunder"(name, doi) VALUES ('National Science Foundation', INSERT INTO public."DoiFunder"(name, doi) VALUES ('Nederlandse Organisatie voor Wetenschappelijk Onderzoek', '10.13039/501100003246'); INSERT INTO public."DoiFunder"(name, doi) VALUES ('Wellcome Trust', '10.13039/100004440'); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.003', '2020-05-06 18:11:00.000000+03', now(), 'Add Doi Funder');
dmp-db-scema/updates/01/01_DMPUser_DMPDatasetprofile_DMPFinalizedDate.sqldeleted 100644 → 0 +0 −61 Original line number Diff line number Diff line INSERT INTO public."UserDMP"( usr, dmp, role) SELECT "Creator", "ID", 0 FROM public."DMP"; DELETE FROM public."UserDMP" as us1 using public."UserDMP" as us2 where us1."id" < us2."id" AND us1."dmp" = us2."dmp"; CREATE TABLE public."DMPDatasetProfile" ( "ID" uuid NOT NULL DEFAULT uuid_generate_v4(), dmp uuid NOT NULL, datasetprofile uuid NOT NULL, CONSTRAINT "DMPDatasetProfile_pkey" PRIMARY KEY ("ID"), CONSTRAINT "DMPDatasetProfile_datasetprofile_fkey" FOREIGN KEY (datasetprofile) REFERENCES public."DatasetProfile" ("ID") MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT "DMPDatasetProfile_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."DMP" ("ID") MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public."DMPDatasetProfile" -- OWNER to dmtadm; OWNER to :POSTGRES_USER; ALTER TABLE public."UserDMP" -- OWNER to dmtadm; OWNER to :POSTGRES_USER; --INSERT INTO public."DMPDatasetProfile"( -- dmp, datasetprofile) -- SELECT "ID", unnest(xpath('/profiles/profile/@profileId', dmpp."AssociatedDmps"::xml)::text[]::UUID[]) -- FROM public."DMP" as dmpp; ALTER TABLE public."DMP" ADD "FinalizedDat" timestamp(6) WITH time zone; UPDATE public."DMP" SET "FinalizedDat" = "Modified" WHERE "Status" = 1; ALTER TABLE public."Dataset" ADD "FinalizedDat" timestamp(6) WITH time zone; UPDATE public."Dataset" SET "FinalizedDat" = "Modified" WHERE "Status" = 1;
dmp-db-scema/updates/01/03_DMPisPublic.sqldeleted 100644 → 0 +0 −7 Original line number Diff line number Diff line alter table public."DMP" Add "isPublic" boolean NOT NULL Default False; UPDATE public."DMP" SET "isPublic" = True WHERE "Status" = 1; No newline at end of file