Remove "CHARSET" config option for MySQL, always use "utf8mb4" (#25413)
In modern days, there is no reason to make users set "charset" anymore. Close #25378 ## ⚠️ BREAKING The key `[database].CHARSET` was removed completely as every newer (>10years) MySQL database supports `utf8mb4` already. There is a (deliberately) undocumented new fallback option if anyone still needs to use it, but we don't recommend using it as it simply causes problems.
This commit is contained in:
parent
dfd19fa38c
commit
ce46834b93
8 changed files with 9 additions and 46 deletions
|
@ -99,7 +99,6 @@ func Install(ctx *context.Context) {
|
|||
form.DbName = setting.Database.Name
|
||||
form.DbPath = setting.Database.Path
|
||||
form.DbSchema = setting.Database.Schema
|
||||
form.Charset = setting.Database.Charset
|
||||
|
||||
curDBType := setting.Database.Type.String()
|
||||
var isCurDBTypeSupported bool
|
||||
|
@ -269,7 +268,6 @@ func SubmitInstall(ctx *context.Context) {
|
|||
setting.Database.Name = form.DbName
|
||||
setting.Database.Schema = form.DbSchema
|
||||
setting.Database.SSLMode = form.SSLMode
|
||||
setting.Database.Charset = form.Charset
|
||||
setting.Database.Path = form.DbPath
|
||||
setting.Database.LogSQL = !setting.IsProd
|
||||
|
||||
|
@ -388,7 +386,6 @@ func SubmitInstall(ctx *context.Context) {
|
|||
cfg.Section("database").Key("PASSWD").SetValue(setting.Database.Passwd)
|
||||
cfg.Section("database").Key("SCHEMA").SetValue(setting.Database.Schema)
|
||||
cfg.Section("database").Key("SSL_MODE").SetValue(setting.Database.SSLMode)
|
||||
cfg.Section("database").Key("CHARSET").SetValue(setting.Database.Charset)
|
||||
cfg.Section("database").Key("PATH").SetValue(setting.Database.Path)
|
||||
cfg.Section("database").Key("LOG_SQL").SetValue("false") // LOG_SQL is rarely helpful
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue