Migrate endpoints during upgrade.

[merge]