DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=2374) THEN
		RETURN;
          END IF;
        BEGIN
  
	 ALTER TABLE public."EventDetails"  ADD "UidNew" character varying(256);
UPDATE public."EventDetails"  SET "UidNew"="Uid";
ALTER TABLE  public."EventDetails" DROP COLUMN  "Uid";
ALTER TABLE public."EventDetails" RENAME COLUMN "UidNew" to "Uid";
CREATE INDEX "IDX_EventDetails_Uid"
    ON public."EventDetails" USING btree
    ("Uid" ASC NULLS LAST)
    TABLESPACE pg_default; 

        EXCEPTION
            WHEN OTHERS THEN RAISE NOTICE 'Change size Uid table <EventDetails> error.';
        END;
    END;
$$

