DO $$DECLARE
   this_version CONSTANT varchar := '00.01.017';
BEGIN
   PERFORM * FROM "DBVersion" WHERE version = this_version;
   IF FOUND THEN RETURN; END IF;

        CREATE TABLE public."User"
        (
            id uuid NOT NULL,
            name character varying(250),
            additional_info character varying,
            created_at timestamp without time zone NOT NULL,
            updated_at timestamp without time zone NOT NULL,
            is_active smallint NOT NULL,
            PRIMARY KEY (id)
        )
        WITH (
            OIDS = FALSE
        );

INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.017', '2023-11-20 12:00:00.000000+02', now(), 'Add table User.');

END$$;