Move migrate.rake task to lib folder