1
0
Fork 0
forked from forgejo/forgejo

Use "utf8mb4" for MySQL by default (#25432)

TBH, I don't see much difference from `Remove "CHARSET" config option
for MySQL, always use "utf8mb4"` #25413

Close #25413
This commit is contained in:
wxiaoguang 2023-06-22 13:38:23 +08:00 committed by GitHub
parent ffe089432f
commit cb3173a1e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 36 deletions

View file

@ -98,7 +98,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
@ -268,7 +267,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
@ -382,7 +380,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