Break migration into smaller transactions
Merge pull request #732 from JamesGlover/fix_massive_migration

Break migration into smaller transactions