DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=2797) THEN
		RETURN;
          END IF;
        BEGIN

       
	   ALTER TABLE public."EventDetails" ADD "NameNew" character varying(1024);
   UPDATE public."EventDetails" SET "NameNew" = "Name";
   ALTER TABLE public."EventDetails" DROP "Name";
   ALTER TABLE public."EventDetails" RENAME COLUMN "NameNew" TO "Name";

        EXCEPTION
            WHEN OTHERS THEN RAISE NOTICE 'Resize Name to table EventDetails error.';
        END;
    END;
$$

