refactoring migrations