argos/dmp-db-scema/updates/00.01.074_Add_PlanWorkflow_...

27 lines
873 B
MySQL
Raw Normal View History

2024-08-23 14:17:51 +02:00
DO $$DECLARE
this_version CONSTANT varchar := '00.01.074';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
CREATE TABLE public."PlanWorkflow"
(
id uuid NOT NULL,
name character varying(250) COLLATE pg_catalog."default" NOT NULL,
description text COLLATE pg_catalog."default",
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
is_active smallint NOT NULL,
definition xml,
tenant uuid,
CONSTRAINT "PlanWorkflow_pkey" PRIMARY KEY (id),
CONSTRAINT "PlanWorkflow_tenant_fkey" FOREIGN KEY (tenant)
REFERENCES public."Tenant" (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
NOT VALID
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.074', '2024-08-23 12:00:00.000000+02', now(), 'Add plan workflow table.');
END$$;