From fb3549b70e3703f9ef0c29a317228b836c4c6673 Mon Sep 17 00:00:00 2001 From: amentis Date: Wed, 26 Jun 2024 17:33:23 +0300 Subject: [PATCH] add ant_Status table sql script --- .../updates/00.02.000_RemoveUnusedTables.sql | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 dmp-db-scema/updates/00.02.000_RemoveUnusedTables.sql diff --git a/dmp-db-scema/updates/00.02.000_RemoveUnusedTables.sql b/dmp-db-scema/updates/00.02.000_RemoveUnusedTables.sql new file mode 100644 index 000000000..7a950e3ab --- /dev/null +++ b/dmp-db-scema/updates/00.02.000_RemoveUnusedTables.sql @@ -0,0 +1,43 @@ +DO $$DECLARE + this_version CONSTANT varchar := '00.02.000'; +BEGIN + PERFORM * FROM "DBVersion" WHERE version = this_version; + IF FOUND THEN RETURN; END IF; + + DROP TABLE public."DatasetDataRepository"; + DROP TABLE public."DatasetExternalDataset"; + DROP TABLE public."DatasetRegistry"; + DROP TABLE public."DatasetService"; + DROP TABLE public."Dataset"; + + DROP TABLE public."DMPDatasetProfile"; + DROP TABLE public."DMPOrganisation"; + DROP TABLE public."DMPResearcher"; + DROP TABLE public."UserDMP"; + DROP TABLE public."Invitation"; + DROP TABLE public."DMP"; + + DROP TABLE public."DoiFunder"; + + DROP TABLE public."DataRepository"; + DROP TABLE public."ExternalDataset"; + DROP TABLE public."Project"; + DROP TABLE public."Funder"; + DROP TABLE public."Grant"; + DROP TABLE public."Organisation"; + DROP TABLE public."Registry"; + DROP TABLE public."Researcher"; + DROP TABLE public."Service"; + + DROP TABLE public."Content"; + DROP TABLE public."Credential"; + DROP TABLE public."EmailConfirmation"; + DROP TABLE public."FileUpload"; + DROP TABLE public."NotificationLegacy"; + DROP TABLE public."UserAssociation"; + DROP TABLE public."UserToken"; + DROP TABLE public."UserInfo"; + + INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.02.000', '2024-06-26 12:00:00.000000+02', now(), 'Remove unused tables.'); + +END$$; \ No newline at end of file