argos/dmp-db-scema/updates/00.01.048_Add_ant_QueueInbo...

32 lines
1.3 KiB
MySQL
Raw Normal View History

DO $$DECLARE
this_version CONSTANT varchar := '00.01.048';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
CREATE TABLE public."ant_QueueInbox"
(
id uuid NOT NULL,
queue character varying(50) COLLATE pg_catalog."default" NOT NULL,
exchange character varying(50) COLLATE pg_catalog."default" NOT NULL,
route character varying(50) COLLATE pg_catalog."default" NOT NULL,
application_id character varying(100) COLLATE pg_catalog."default" NOT NULL,
message_id uuid NOT NULL,
message json NOT NULL,
retry_count integer,
status character varying(50) COLLATE pg_catalog."default" NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
tenant uuid,
is_active smallint NOT NULL,
CONSTRAINT "ant_QueryInbox_pkey" PRIMARY KEY (id),
CONSTRAINT "ant_QueryInbox_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.048', '2024-02-13 12:00:00.000000+02', now(), 'Add table ant_QueueInbox.');
END$$;