2023-12-05 10:56:25 +01:00
|
|
|
DO $$DECLARE
|
|
|
|
this_version CONSTANT varchar := '00.01.029';
|
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
|
|
|
CREATE TABLE public."QueueOutbox"
|
|
|
|
(
|
|
|
|
id uuid NOT NULL,
|
2023-12-06 10:34:24 +01:00
|
|
|
exchange character varying(200) COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
route character varying(200) COLLATE pg_catalog."default" NOT NULL,
|
2023-12-05 10:56:25 +01:00
|
|
|
message_id uuid NOT NULL,
|
2024-03-29 13:32:47 +01:00
|
|
|
notify_status smallint NOT NULL,
|
2023-12-05 10:56:25 +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,
|
2023-12-06 10:34:24 +01:00
|
|
|
message text COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
is_active smallint NOT NULL,
|
2023-12-05 10:56:25 +01:00
|
|
|
CONSTRAINT "QueueOutbox_pkey" PRIMARY KEY (id),
|
|
|
|
CONSTRAINT "QueueOutbox_tennat_fkey" FOREIGN KEY (tenant)
|
|
|
|
REFERENCES public."Tenant" (id) MATCH SIMPLE
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.029', '2023-12-05 12:00:00.000000+02', now(), 'Add table QueueOutbox.');
|
|
|
|
|
|
|
|
END$$;
|