add migrate-index.sh for one-step reindexing.