From b9ce41c115f3b7ef164d55e62532d8daab7759d0 Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Wed, 21 Aug 2024 15:41:09 +0300 Subject: [PATCH] fix script --- .../updates/00.01.072_Add_PlanStatus_table.sql | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dmp-db-scema/updates/00.01.072_Add_PlanStatus_table.sql b/dmp-db-scema/updates/00.01.072_Add_PlanStatus_table.sql index 9fe8b4905..aa0af1e30 100644 --- a/dmp-db-scema/updates/00.01.072_Add_PlanStatus_table.sql +++ b/dmp-db-scema/updates/00.01.072_Add_PlanStatus_table.sql @@ -7,13 +7,19 @@ BEGIN CREATE TABLE public."PlanStatus" ( id uuid NOT NULL, - name character varying(250) NOT NULL, - description text, + name character varying(250) COLLATE pg_catalog."default" NOT NULL, + description text COLLATE pg_catalog."default", created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, is_active smallint NOT NULL, internal_status smallint NOT NULL, - PRIMARY KEY (id) + tenant uuid, + CONSTRAINT "PlanStatus_pkey" PRIMARY KEY (id), + CONSTRAINT "PlanStatus_tenant_fkey" FOREIGN KEY (tenant) + REFERENCES public."Tenant" (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + NOT VALID ); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.072', '2024-08-21 12:00:00.000000+02', now(), 'Add plan status table.');