add blueprint code column script

This commit is contained in:
CITE\amentis 2024-07-29 17:08:02 +03:00
parent 841c9a3060
commit cdb19efaa6
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.071';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
ALTER TABLE public."PlanBlueprint" ADD COLUMN code character varying(200);
UPDATE public."PlanBlueprint" SET code = group_id;
ALTER TABLE public."PlanBlueprint" ALTER COLUMN code SET NOT NULL;
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.071', '2024-07-29 12:00:00.000000+02', now(), 'Add PlanBlueprint code column.');
END$$;