coding.sh upgrade-store
Migrate the store for this install, or put back the index from before a migration. Every option of coding.sh upgrade-store, from its own --help.
coding.sh upgrade-store [options]
Migrate the store for this install, or put back the index from before a migration
Options
--restore Put back the index kept from before the last migration (index.db.v<N>.bak); the index it replaces is kept too
-y, --yes Answer yes to confirmation prompts. An agent passes it only once the user approves
Examples
coding.sh upgrade-store
coding.sh upgrade-store --restore
Notes
The store's owner is the coding.sh that ~/.coding.sh/bin/cli-path names: init and update write it, and hooks start it. The index migrates on its own only for the owner, and only for a release newer than the coding.sh that last wrote it.
Migrations are one-way, so an older coding.sh may not open the store after. Every migration first keeps a copy of the index next to it (index.db.v<N>.bak), and this command also makes bin/cli-path name the running coding.sh.
--restore puts that copy back and keeps the index it replaces (index.db.v<N>.undone). Any coding.sh that knows the copy's schema can run it, including one the migration left unable to open the store.