DO $$ 
    BEGIN
        BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF;
 		ALTER TABLE public."DocumentDirectories" ADD  "Size" bigint;
 		ALTER TABLE public."DocumentDirectories" ADD  "SourceParentId" bigint;
  		UPDATE public."DocumentDirectories" SET  "SourceParentId" ="ParentId";

        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'column <SourceParentId> already exists in <DocumentDirectories>.';
        END;
    END;
$$
