[cherry-pick] Refactor the migration cases. #8533
+437
−387
Merged
Loading