Compare commits
2 Commits
d061bc6d12
...
64162a1c58
Author | SHA1 | Date |
---|---|---|
amentis | 64162a1c58 | |
amentis | aa702e29c2 |
|
@ -0,0 +1,36 @@
|
||||||
|
DO $$DECLARE
|
||||||
|
this_version CONSTANT varchar := '00.02.002';
|
||||||
|
BEGIN
|
||||||
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
||||||
|
IF FOUND THEN RETURN; END IF;
|
||||||
|
|
||||||
|
CREATE TABLE public."ant_AnnotationStatus"
|
||||||
|
(
|
||||||
|
id uuid NOT NULL,
|
||||||
|
annotation_id uuid NOT NULL,
|
||||||
|
status_id uuid NOT NULL,
|
||||||
|
created_at timestamp without time zone NOT NULL,
|
||||||
|
updated_at timestamp without time zone NOT NULL,
|
||||||
|
is_active smallint NOT NULL,
|
||||||
|
tenant uuid,
|
||||||
|
CONSTRAINT "ant_AnnotationStatus_pkey" PRIMARY KEY (id),
|
||||||
|
CONSTRAINT "ant_AnnotationStatus_annotation_fkey" FOREIGN KEY (annotation_id)
|
||||||
|
REFERENCES public."ant_Annotation" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
NOT VALID,
|
||||||
|
CONSTRAINT "ant_AnnotationStatus_tenant_fkey" FOREIGN KEY (tenant)
|
||||||
|
REFERENCES public."ant_Tenant" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
NOT VALID,
|
||||||
|
CONSTRAINT "ant_AnnotationStatus_status_fkey" FOREIGN KEY (status_id)
|
||||||
|
REFERENCES public."ant_Annotation" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
NOT VALID
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.02.002', '2024-06-26 12:00:00.000000+02', now(), 'Add ant_AnnotationStatus table.');
|
||||||
|
|
||||||
|
END$$;
|
Loading…
Reference in New Issue