Enforce canonical database naming (beads.db) - bd-165
- Added CanonicalDatabaseName constant (beads.db) and LegacyDatabaseNames list - Updated bd init to use canonical name via constant - Added daemon validation to reject non-canonical database names - Updated bd migrate to use canonical name constant - Enhanced FindDatabasePath to warn when using legacy database names - All database discovery now prefers beads.db with backward compatibility Closes bd-165
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/steveyegge/beads"
|
||||
"github.com/steveyegge/beads/internal/configfile"
|
||||
"github.com/steveyegge/beads/internal/storage/sqlite"
|
||||
)
|
||||
@@ -48,7 +49,7 @@ and database file. Optionally specify a custom issue prefix.`,
|
||||
// Use global dbPath if set via --db flag or BEADS_DB env var, otherwise default to .beads/beads.db
|
||||
initDBPath := dbPath
|
||||
if initDBPath == "" {
|
||||
initDBPath = filepath.Join(".beads", "beads.db")
|
||||
initDBPath = filepath.Join(".beads", beads.CanonicalDatabaseName)
|
||||
}
|
||||
|
||||
// Migrate old database files if they exist
|
||||
|
||||
Reference in New Issue
Block a user