updates the migration order