argos/dmp-db-scema/updates/00.01.071_Add_PlanBlueprint...

13 lines
513 B
MySQL
Raw Normal View History

2024-07-29 16:08:02 +02:00
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$$;