MigrateController refactoring