Work on changing migration to operate in batches