go-admin-team / go-admin-ui

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统的前端模块
https://www.go-admin.dev
MIT License
1.16k stars 711 forks source link

可以在初始化表的时候设置为utf8,适配数据库不是utf8的人 #190

Closed Vingurzhou closed 2 years ago

Vingurzhou commented 2 years ago

err := tx.Set("gorm:table_options", "ENGINE=InnoDB DEFAULT CHARSET=utf8").Debug().Migrator().AutoMigrate( new(models.CasbinRule), new(models.SysDept), new(models.SysConfig), new(models.SysTables), new(models.SysColumns), new(models.SysMenu), new(models.SysLoginLog), new(models.SysOperaLog), new(models.SysRoleDept), new(models.SysUser), new(models.SysRole), new(models.SysPost), new(models.DictData), new(models.DictType), new(models.SysJob), new(models.SysConfig), new(models.SysApi), new(models.TbDemo), )

wenjianzhang commented 2 years ago

done