Finish migration functions