mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
数据库连接初始化优化
权限部分修改
This commit is contained in:
@@ -28,7 +28,7 @@ func _1599190683659Tables(db *gorm.DB, version string) error {
|
||||
new(system.SysLoginLog),
|
||||
new(system.SysOperaLog),
|
||||
new(models.RoleMenu),
|
||||
new(models.SysRoleDept),
|
||||
new(system.SysRoleDept),
|
||||
new(models.SysUser),
|
||||
new(system.SysRole),
|
||||
new(models.Post),
|
||||
|
||||
@@ -72,7 +72,7 @@ func migrateModel() error {
|
||||
}
|
||||
func initDB() error {
|
||||
//3. 初始化数据库链接
|
||||
database.Setup(config.DatabaseConfig.Driver)
|
||||
database.Setup()
|
||||
//4. 数据库迁移
|
||||
fmt.Println("数据库迁移开始")
|
||||
_ = migrateModel()
|
||||
|
||||
Reference in New Issue
Block a user