mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 20:35:16 +00:00
refactor:
- 优化 postgresql 的配置文件 - dsn 优化 - gorm logger 代码优化 - 优化 注册表 函数名 - 更新 go.mod
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ func main() {
|
||||
global.GVA_DB = initialize.Gorm() // gorm连接数据库
|
||||
initialize.Timer()
|
||||
if global.GVA_DB != nil {
|
||||
initialize.MysqlTables(global.GVA_DB) // 初始化表
|
||||
initialize.RegisterTables(global.GVA_DB) // 初始化表
|
||||
// 程序结束前关闭数据库链接
|
||||
db, _ := global.GVA_DB.DB()
|
||||
defer db.Close()
|
||||
|
||||
Reference in New Issue
Block a user