diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-06-21 18:49:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 10:49:25 +0000 |
commit | ce46834b938eb687152a680669ada95a26304178 (patch) | |
tree | 7a234a4673d41bb0f374670a02013b62f1e5d851 /routers/install | |
parent | dfd19fa38c9ee004c5d7e73f51af5981adcb5e6d (diff) | |
download | gitea-ce46834b938eb687152a680669ada95a26304178.tar.gz gitea-ce46834b938eb687152a680669ada95a26304178.zip |
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
## :warning: 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.
Diffstat (limited to 'routers/install')
-rw-r--r-- | routers/install/install.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/routers/install/install.go b/routers/install/install.go index c94a30b89f..f121f31376 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -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 |