How does migrating work