update migrate code