DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=2316) THEN
		RETURN;
          END IF;
        BEGIN
  
	   ALTER TABLE public."EmailFolders" ADD "Status" INT NULL;
	   UPDATE public."EmailFolders" SET "Status"=0;

        EXCEPTION
            WHEN OTHERS THEN RAISE NOTICE 'Add Status table <EmailFolders> error.';
        END;
    END;
$$

