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

@@ -94,6 +94,21 @@ You can use project-specific databases:
./bd --db ./my-project.db create "Task"
```
## Migrating Databases
After upgrading bd, use `bd migrate` to check for and migrate old database files:
```bash
# Check for migration opportunities
./bd migrate --dry-run
# Migrate old databases to beads.db
./bd migrate
# Migrate and clean up old files
./bd migrate --cleanup --yes
```
## Next Steps
- Add labels: `./bd create "Task" -l "backend,urgent"`