From 3366e89901d659d3b1c95c9571dfef309e7df774 Mon Sep 17 00:00:00 2001 From: Anye Date: Fri, 27 Jun 2025 19:59:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(db):=20=E5=B0=86MariaDB=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=B1=BB=E5=9E=8B=E6=98=A0=E5=B0=84=E5=88=B0MySQL?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory/client.go | 3 +++ pkg/conf/types.go | 1 + 2 files changed, 4 insertions(+) diff --git a/inventory/client.go b/inventory/client.go index bbbee4b..208173c 100644 --- a/inventory/client.go +++ b/inventory/client.go @@ -52,6 +52,9 @@ func NewRawEntClient(l logging.Logger, config conf.ConfigProvider) (*ent.Client, if confDBType == conf.SQLite3DB || confDBType == "" { confDBType = conf.SQLiteDB } + if confDBType == "mariadb" { + confDBType = conf.MySqlDB + } var ( err error diff --git a/pkg/conf/types.go b/pkg/conf/types.go index 285278f..e5a53b4 100644 --- a/pkg/conf/types.go +++ b/pkg/conf/types.go @@ -10,6 +10,7 @@ var ( MySqlDB DBType = "mysql" MsSqlDB DBType = "mssql" PostgresDB DBType = "postgres" + MariaDB DBType = "mariadb" ) // Database 数据库