feat: integrate migration detection into bd doctor (bd-7l27)

Add a consolidated "Pending Migrations" check to bd doctor that:
- Detects sequential ID usage (suggests bd migrate hash-ids)
- Detects legacy deletions.jsonl (suggests bd migrate tombstones)
- Detects missing sync-branch config (suggests bd migrate sync)
- Detects database version mismatches (suggests bd migrate)

Also updates existing checks to use correct modern commands:
- CheckIDFormat: bd migrate hash-ids (was bd migrate --to-hash-ids)
- CheckDeletionsManifest: bd migrate tombstones (was bd migrate-tombstones)
- CheckSyncBranchConfig: bd migrate sync beads-sync (was config.yaml edit)

Removes TODO(bd-7l27) comments from migrate_*.go files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-30 00:06:10 -08:00
parent 0597d66275
commit fb5fd88722
10 changed files with 472 additions and 9 deletions

View File

@@ -19,7 +19,6 @@ import (
_ "github.com/ncruces/go-sqlite3/embed"
)
// TODO(bd-7l27): Consider integrating into 'bd doctor' migration detection
var migrateCmd = &cobra.Command{
Use: "migrate",
GroupID: "maint",