add description template type code column script

This commit is contained in:
amentis 2024-07-24 15:52:51 +03:00
parent 48434f845e
commit 3987620244
1 changed files with 13 additions and 0 deletions

View File

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