2024-02-13 17:31:01 +01:00
|
|
|
DO $$DECLARE
|
2024-02-21 16:53:28 +01:00
|
|
|
this_version CONSTANT varchar := '00.01.050';
|
2024-02-13 17:31:01 +01:00
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
|
|
|
CREATE TABLE public."ant_QueueOutbox"
|
|
|
|
(
|
|
|
|
id uuid NOT NULL,
|
|
|
|
exchange character varying(200) COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
route character varying(200) COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
message_id uuid NOT NULL,
|
2024-03-29 13:32:47 +01:00
|
|
|
notify_status smallint NOT NULL,
|
2024-02-13 17:31:01 +01:00
|
|
|
retry_count integer NOT NULL,
|
|
|
|
published_at timestamp without time zone,
|
|
|
|
confirmed_at timestamp without time zone,
|
|
|
|
tenant uuid,
|
|
|
|
created_at timestamp without time zone NOT NULL,
|
|
|
|
updated_at timestamp without time zone NOT NULL,
|
|
|
|
message text COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
is_active smallint NOT NULL,
|
|
|
|
CONSTRAINT "ant_QueueOutbox_pkey" PRIMARY KEY (id),
|
|
|
|
CONSTRAINT "ant_QueueOutbox_tenant_fkey" FOREIGN KEY (tenant)
|
2024-02-21 16:53:28 +01:00
|
|
|
REFERENCES public."ant_Tenant" (id) MATCH SIMPLE
|
2024-02-13 17:31:01 +01:00
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
);
|
|
|
|
|
2024-02-21 16:53:28 +01:00
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.050', '2024-02-13 12:00:00.000000+02', now(), 'Add table ant_QueueOutbox.');
|
2024-02-13 17:31:01 +01:00
|
|
|
|
|
|
|
END$$;
|