fix(db): map MariaDB type to MySQL (#2587)

* fix(db): 将MariaDB数据库类型映射到MySQL类型

* Update client.go
pull/2603/head
Anye 2025-06-30 19:32:21 +08:00 committed by GitHub
parent 642c32c6cc
commit e0b2b4649e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -52,6 +52,9 @@ func NewRawEntClient(l logging.Logger, config conf.ConfigProvider) (*ent.Client,
if confDBType == conf.SQLite3DB || confDBType == "" { if confDBType == conf.SQLite3DB || confDBType == "" {
confDBType = conf.SQLiteDB confDBType = conf.SQLiteDB
} }
if confDBType == conf.MariaDB {
confDBType = conf.MySqlDB
}
var ( var (
err error err error

View File

@ -10,6 +10,7 @@ var (
MySqlDB DBType = "mysql" MySqlDB DBType = "mysql"
MsSqlDB DBType = "mssql" MsSqlDB DBType = "mssql"
PostgresDB DBType = "postgres" PostgresDB DBType = "postgres"
MariaDB DBType = "mariadb"
) )
// Database 数据库 // Database 数据库