chore: remove remaining QuoteForge/qfs references
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
appDirName = "QuoteForge"
|
||||
defaultDB = "qfs.db"
|
||||
appDirName = "PriceForge"
|
||||
defaultDB = "pfs.db"
|
||||
defaultCfg = "config.yaml"
|
||||
envDBPath = "QFS_DB_PATH"
|
||||
envStateDir = "QFS_STATE_DIR"
|
||||
@@ -149,13 +149,13 @@ func defaultStateDir() (string, error) {
|
||||
return filepath.Join(base, appDirName), nil
|
||||
default:
|
||||
if xdgState := os.Getenv("XDG_STATE_HOME"); xdgState != "" {
|
||||
return filepath.Join(xdgState, "quoteforge"), nil
|
||||
return filepath.Join(xdgState, "priceforge"), nil
|
||||
}
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("resolving user home dir: %w", err)
|
||||
}
|
||||
return filepath.Join(home, ".local", "state", "quoteforge"), nil
|
||||
return filepath.Join(home, ".local", "state", "priceforge"), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ func TestSyncReadinessOfflineBlocked(t *testing.T) {
|
||||
gin.SetMode(gin.TestMode)
|
||||
|
||||
dir := t.TempDir()
|
||||
local, err := localdb.New(filepath.Join(dir, "qfs.db"))
|
||||
local, err := localdb.New(filepath.Join(dir, "pfs.db"))
|
||||
if err != nil {
|
||||
t.Fatalf("init local db: %v", err)
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ func getEncryptionKey() []byte {
|
||||
if key == "" {
|
||||
// Fallback to a machine-based key (hostname + fixed salt)
|
||||
hostname, _ := os.Hostname()
|
||||
key = hostname + "quoteforge-salt-2024"
|
||||
key = hostname + "priceforge-salt-2024"
|
||||
}
|
||||
// Hash to get exactly 32 bytes for AES-256
|
||||
hash := sha256.Sum256([]byte(key))
|
||||
|
||||
@@ -23,7 +23,7 @@ func AllModels() []interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
// Migrate runs auto-migration for all QuoteForge tables
|
||||
// Migrate runs auto-migration for all PriceForge tables
|
||||
// Handles MySQL constraint errors gracefully for existing tables
|
||||
func Migrate(db *gorm.DB) error {
|
||||
for _, model := range AllModels() {
|
||||
|
||||
Reference in New Issue
Block a user