Add bd migrate command for database upgrades (bd-164)

- Implement bd migrate command with detection, version checking, and cleanup
- Update daemon to suggest bd migrate for version mismatches
- Enhance CLI version warnings to recommend bd migrate
- Add comprehensive tests for migration scenarios
- Document migration workflow in QUICKSTART.md and AGENTS.md

Completes bd-164 and epic bd-159

Amp-Thread-ID: https://ampcode.com/threads/T-34ea4682-8c48-44c2-8421-dc40f867773b
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-26 19:20:39 -07:00
parent 5cede5e84d
commit 7591a3bf81
6 changed files with 522 additions and 3 deletions

View File

@@ -1121,8 +1121,8 @@ func runDaemonLoop(interval time.Duration, autoCommit, autoPush bool, logPath, p
log.log("This may cause compatibility issues.")
log.log("")
log.log("Options:")
log.log(" 1. Upgrade/downgrade bd to match database version: %s", dbVersion)
log.log(" 2. Run 'bd init' to update the database to the current version")
log.log(" 1. Run 'bd migrate' to update the database to the current version")
log.log(" 2. Upgrade/downgrade bd to match database version: %s", dbVersion)
log.log(" 3. Set BEADS_IGNORE_VERSION_MISMATCH=1 to proceed anyway (not recommended)")
log.log("")