Refactor the migration.