fix(db): stabilize connection settings and explicitly define AppConfig table name
- Set SQL connection idle limit to 1 to reduce resource usage - Explicitly define AppConfig table name to prevent GORM pluralization issues
This commit is contained in:
@@ -80,6 +80,7 @@ func Connect(dbpath string) (*gorm.DB, error) {
|
||||
return nil, fmt.Errorf("could not get underlying sql.DB: %w", err)
|
||||
}
|
||||
sqlDB.SetMaxOpenConns(1)
|
||||
sqlDB.SetMaxIdleConns(1)
|
||||
|
||||
// ── Pragmas ───────────────────────────────────────────────────────────
|
||||
pragmas := []string{
|
||||
|
||||
Reference in New Issue
Block a user