Refactored migration method
Minor refactoring