Refactor migration file