argos/dmp-db-scema/updates/00.01.069_Add_DescriptionTe...

13 lines
547 B
MySQL
Raw Normal View History

2024-07-26 16:27:01 +02:00
DO $$DECLARE
this_version CONSTANT varchar := '00.01.069';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
ALTER TABLE public."DescriptionTemplate" ADD COLUMN code character varying(200);
UPDATE public."DescriptionTemplate" SET code = uuid_generate_v4();
ALTER TABLE public."DescriptionTemplate" ALTER COLUMN code SET NOT NULL;
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.069', '2024-07-26 12:00:00.000000+02', now(), 'Add DescriptionTemplate code column.');
END$$;