DO $$ 
DECLARE 
 
    ver INT = 16052;
    BEGIN
        BEGIN
          INSERT INTO public."Versions" ("Path", "Build")
		  select 'Install',ver 
		  WHERE NOT EXISTS (SELECT "Path" FROM public."Versions" WHERE "Path"='Install');
		  
          UPDATE public."Versions" SET "Build"=ver WHERE "Path"='Install';
        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'Can not update db version';
        END;
    END;
$$