Altered Dehasher to CrowsNest

! WARNING !

This will break older versions of CrowsNest. The database file will no longer be compatible
This commit is contained in:
Evan Hosinski
2025-05-21 09:14:56 -04:00
parent fbe1eda8e9
commit ded3e4ae71
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ go build crowsnest.go
CrowsNest supports two database storage options: CrowsNest supports two database storage options:
1. **Default Path** (default): Stores the database at `~/.local/share/crowsnest/db/dehashed.sqlite` 1. **Default Path** (default): Stores the database at `~/.local/share/crowsnest/db/crowsnest.sqlite`
2. **Local Path**: Stores the database in the current directory as `./crowsnest.sqlite` 2. **Local Path**: Stores the database in the current directory as `./crowsnest.sqlite`
The **Local Path** option allows for separate databases for different projects or engagements. The **Local Path** option allows for separate databases for different projects or engagements.
+1 -1
View File
@@ -82,7 +82,7 @@ func main() {
useLocalDB := badger.GetUseLocalDB() useLocalDB := badger.GetUseLocalDB()
if useLocalDB { if useLocalDB {
// Use local database in current directory // Use local database in current directory
dbPath = "./dehasher.sqlite" dbPath = "./crowsnest.sqlite"
zap.L().Info("Using local database", zap.String("path", dbPath)) zap.L().Info("Using local database", zap.String("path", dbPath))
} else { } else {
// Use default database path // Use default database path
+1 -1
View File
@@ -29,7 +29,7 @@ func InitDB(dbPath string) (*gorm.DB, error) {
zap.L().Error("Failed to create database directory", zap.Error(err)) zap.L().Error("Failed to create database directory", zap.Error(err))
return nil, fmt.Errorf("failed to create database directory: %w", err) return nil, fmt.Errorf("failed to create database directory: %w", err)
} }
finalDbPath = filepath.Join(dbPath, "dehashed.sqlite") finalDbPath = filepath.Join(dbPath, "crowsnest.sqlite")
} else { } else {
// Treat as file path // Treat as file path
// Ensure the directory exists // Ensure the directory exists