Drop old unused dataset related tables, small fix to migration script
This commit is contained in:
parent
e31970c7ea
commit
5d882c7e88
|
@ -21,7 +21,8 @@ CREATE TABLE IF NOT EXISTS public."Dmp"
|
|||
"is_active" smallint NOT NULL DEFAULT 1,
|
||||
"finalized_at" timestamp without time zone,
|
||||
"published_at" timestamp without time zone,
|
||||
CONSTRAINT "Dmp_pkey" PRIMARY KEY (id)
|
||||
CONSTRAINT "Dmp_pkey" PRIMARY KEY (id),
|
||||
CONSTRAINT "Dmp_creator_fkey" FOREIGN KEY (creator) REFERENCES public."UserInfo" (id)
|
||||
)
|
||||
|
||||
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.005', '2023-10-27 12:00:00.000000+02', now(), 'Add Dmp table.');
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
DO $$DECLARE
|
||||
this_version CONSTANT varchar := '00.01.009';
|
||||
BEGIN
|
||||
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
||||
IF FOUND THEN RETURN; END IF;
|
||||
|
||||
DROP TABLE public."DatasetProfileViewstyle";
|
||||
|
||||
DROP TABLE public."DatasetProfileRuleset";
|
||||
|
||||
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.009', '2023-10-27 12:00:00.000000+02', now(), 'Drop old dataset related tables.');
|
||||
|
||||
END$$;
|
Loading…
Reference in New Issue