add ant_Status table sql script
This commit is contained in:
parent
b9a62a8abe
commit
ef8bff7f2c
|
@ -0,0 +1,26 @@
|
||||||
|
DO $$DECLARE
|
||||||
|
this_version CONSTANT varchar := '00.02.001';
|
||||||
|
BEGIN
|
||||||
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
||||||
|
IF FOUND THEN RETURN; END IF;
|
||||||
|
|
||||||
|
CREATE TABLE public."ant_Status"
|
||||||
|
(
|
||||||
|
id uuid NOT NULL,
|
||||||
|
label character varying(200) NOT NULL,
|
||||||
|
internal_status smallint,
|
||||||
|
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_Status_pkey" PRIMARY KEY (id),
|
||||||
|
CONSTRAINT "ant_Status_tenant_fkey" FOREIGN KEY (tenant)
|
||||||
|
REFERENCES public."ant_Tenant" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
NOT VALID
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.02.001', '2024-06-26 12:00:00.000000+02', now(), 'Add ant_Status table.');
|
||||||
|
|
||||||
|
END$$;
|
Loading…
Reference in New Issue