Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Vingurzhou opened this issue Jul 28, 2022 · 1 comment
Closed
Assignees

Comments

@Vingurzhou
Copy link
Contributor

  1. Go to './cmd/migrate/migration/version/1599190683659_tables.go'
  2. Scroll down to '1599190683659_tables.go:20'
  3. 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
Copy link
Member

可以提交pr哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants