fix elasticsearch migration