[PATCH 6/6] migrate: Make migration handlers simpler and more flexible