Skip to content

Commit d67fd69

Browse files
lunnytechknowlogick
authored andcommitted
fix charset was not saved after installation finished (#7048)
1 parent f3d87da commit d67fd69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routers/install.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func Install(ctx *context.Context) {
5757
form.DbPasswd = models.DbCfg.Passwd
5858
form.DbName = models.DbCfg.Name
5959
form.DbPath = models.DbCfg.Path
60+
form.Charset = models.DbCfg.Charset
6061

6162
ctx.Data["CurDbOption"] = "MySQL"
6263
switch models.DbCfg.Type {
@@ -246,6 +247,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
246247
cfg.Section("database").Key("USER").SetValue(models.DbCfg.User)
247248
cfg.Section("database").Key("PASSWD").SetValue(models.DbCfg.Passwd)
248249
cfg.Section("database").Key("SSL_MODE").SetValue(models.DbCfg.SSLMode)
250+
cfg.Section("database").Key("CHARSET").SetValue(models.DbCfg.Charset)
249251
cfg.Section("database").Key("PATH").SetValue(models.DbCfg.Path)
250252

251253
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)

0 commit comments

Comments
 (0)