Making the elastic search migrate wait for the database migration to complete.