修改,兼容go-admin sdk方案

This commit is contained in:
linwenxiang
2021-03-09 19:12:49 +08:00
parent c541d09076
commit 25d8364bf4
151 changed files with 578 additions and 3525 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package models
import (
"fmt"
"go-admin/tools/app"
"go-admin/common/global"
"gorm.io/gorm"
"io/ioutil"
"log"
@@ -12,7 +12,7 @@ import (
func InitDb(db *gorm.DB) (err error) {
filePath := "config/db.sql"
err = ExecSql(db, filePath)
if app.Driver == "postgres" {
if global.Driver == "postgres" {
filePath = "config/pg.sql"
err = ExecSql(db, filePath)
}