fix: 修复多库模式不能使用 pg 的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -15,9 +16,9 @@ func DBList() {
|
||||
}
|
||||
switch info.Type {
|
||||
case "mysql":
|
||||
dbMap[info.Dbname] = GormMysqlByConfig(info)
|
||||
dbMap[info.GeneralDB.Dbname] = GormMysqlByConfig(config.Mysql{GeneralDB: info.GeneralDB})
|
||||
case "pgsql":
|
||||
dbMap[info.Dbname] = GormPgSqlByConfig(info)
|
||||
dbMap[info.GeneralDB.Dbname] = GormPgSqlByConfig(config.Pgsql{GeneralDB: info.GeneralDB})
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user