argos/dmp-db-scema/updates/00.01.032_Add_ntf_User.sql

20 lines
741 B
SQL

DO $$DECLARE
this_version CONSTANT varchar := '00.01.032';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
CREATE TABLE IF NOT EXISTS public."ntf_User"
(
"id" uuid NOT NULL,
"name" character varying(250) COLLATE pg_catalog."default",
"additional_info" character varying COLLATE pg_catalog."default",
"created_at" timestamp without time zone NOT NULL DEFAULT now(),
"updated_at" timestamp without time zone NOT NULL DEFAULT now(),
"is_active" smallint NOT NULL DEFAULT 1,
CONSTRAINT "Ntf_User_pkey" PRIMARY KEY (id)
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.032', '2024-01-24 12:00:00.000000+02', now(), 'Add table ntf_User.');
END$$;