From 7d479f181a2557ca04f027a631999c6c0d1c22cc Mon Sep 17 00:00:00 2001 From: hoteas <925970985@qq.com> Date: Sun, 10 Nov 2019 16:51:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 15 ++++++++++++--- dri/db/auto.go | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e761496..9bfdd23 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,9 @@ - + + + diff --git a/dri/db/auto.go b/dri/db/auto.go index 65cd02c..e6069e4 100644 --- a/dri/db/auto.go +++ b/dri/db/auto.go @@ -9,8 +9,10 @@ import ( func SetDB(appIns *hotime.Application) { if appIns.Config.GetString("dbType") == "sqlite" || strings.Index(appIns.Config.GetString("dbName"), ".db") == len(appIns.Config.GetString("dbName"))-3 { + appIns.Config["dbType"] = "sqlite" sqlite.SetDB(appIns) } else { + appIns.Config["dbType"] = "mysql" mysql.SetDB(appIns) } }