Seperate out the migration code into methods