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

	BEGIN

		CREATE INDEX "IDX_UserEmails_UserId" ON public."UserEmails" ("UserId");

		EXCEPTION
			WHEN OTHERS THEN RAISE NOTICE 'CREATE INDEX to table UserEmails error.';
		END;
	END;
$$