2024-02-21 16:48:03 +01:00
|
|
|
DO $$DECLARE
|
|
|
|
this_version CONSTANT varchar := '00.01.055';
|
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS public."ant_Annotation"
|
|
|
|
(
|
|
|
|
"id" uuid NOT NULL,
|
|
|
|
"entity_id" uuid NOT NULL,
|
|
|
|
"entity_type" character varying(512) COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
"anchor" character varying(512) COLLATE pg_catalog."default",
|
|
|
|
"payload" text COLLATE pg_catalog."default",
|
2024-04-04 11:25:43 +02:00
|
|
|
"tenant" uuid NOT NULL,
|
2024-02-21 16:48:03 +01:00
|
|
|
"created_at" timestamp without time zone NOT NULL,
|
|
|
|
"updated_at" timestamp without time zone NOT NULL,
|
|
|
|
"is_active" smallint NOT NULL,
|
2024-04-04 11:25:43 +02:00
|
|
|
CONSTRAINT "ant_Annotation_pkey" PRIMARY KEY (id),
|
|
|
|
CONSTRAINT "ant_Annotation_tenant_fkey" FOREIGN KEY ("tenant")
|
|
|
|
REFERENCES public."ant_Tenant" (id) MATCH SIMPLE
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON DELETE NO ACTION
|
2024-02-21 16:48:03 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.055', '2024-02-20 12:00:00.000000+02', now(), 'Add table ant_Annotation.');
|
|
|
|
|
|
|
|
END$$;
|