argos/dmp-db-scema/updates/00.01.057_Add_PrefillingSou...

27 lines
970 B
MySQL
Raw Permalink Normal View History

DO $$DECLARE
this_version CONSTANT varchar := '00.01.057';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
CREATE TABLE public."PrefillingSource"
(
id uuid NOT NULL,
label character varying(250) NOT NULL,
2024-06-12 11:42:53 +02:00
code character varying(100) NOT NULL,
definition xml NOT NULL,
is_active smallint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
tenant uuid,
CONSTRAINT "PrefillingSource_pkey" PRIMARY KEY (id),
CONSTRAINT "PrefillingSource_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.057', '2024-02-22 12:00:00.000000+02', now(), 'Add PrefillingSource table.');
END$$;