update migration function.