- Added a check for MySQL charset/collation to ensure compatibility with Chinese characters during database initialization. - Updated SQLite busy timeout from 5000ms to 30000ms for improved performance. - Removed commented-out PostgreSQL migration logic for clarity.
16 lines
368 B
Go
16 lines
368 B
Go
package common
|
|
|
|
const (
|
|
DatabaseTypeMySQL = "mysql"
|
|
DatabaseTypeSQLite = "sqlite"
|
|
DatabaseTypePostgreSQL = "postgres"
|
|
)
|
|
|
|
var UsingSQLite = false
|
|
var UsingPostgreSQL = false
|
|
var LogSqlType = DatabaseTypeSQLite // Default to SQLite for logging SQL queries
|
|
var UsingMySQL = false
|
|
var UsingClickHouse = false
|
|
|
|
var SQLitePath = "one-api.db?_busy_timeout=30000"
|