LyricTian / gin-admin

A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI.
http://101.42.232.163:8040
Apache License 2.0
2.6k stars 524 forks source link

创建完数据库,启动后不能自动创建表和数据吗? #45

Open zinwalin opened 5 years ago

zinwalin commented 5 years ago

go run main.go

panic: 加载casbin策略数据发生错误: Error 1146: Table 'goadmin.go_role' doesn't exist

LyricTian commented 5 years ago

在配置文件中有个设置项:

# 是否启用自动映射数据库表结构
enable_auto_migrate = true
zinwalin commented 5 years ago

在配置文件中有个设置项:

# 是否启用自动映射数据库表结构
enable_auto_migrate = true

默认是true.