It seems like we need to factor this repeated block of code out into something else? Esp. given how difficult it to read what the code here does :)

Do we have a MigrationUtils class? 

Please discuss with me and/or Ben