Auto-upgrade to migrations.json manifest format when using CLI tool. Add tests.