File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import (
13
13
"path/filepath"
14
14
"strings"
15
15
"time"
16
+
17
+ "code.gitea.io/gitea/modules/log"
16
18
)
17
19
18
20
var (
@@ -83,6 +85,10 @@ func InitDBConfig() {
83
85
Database .Schema = sec .Key ("SCHEMA" ).String ()
84
86
Database .SSLMode = sec .Key ("SSL_MODE" ).MustString ("disable" )
85
87
Database .Charset = sec .Key ("CHARSET" ).In (defaultCharset , []string {"utf8" , "utf8mb4" })
88
+ if Database .UseMySQL && defaultCharset != "utf8mb4" {
89
+ log .Error ("Deprecated database mysql charset utf8 support, please use utf8mb4 or convert utf8 to utf8mb4." )
90
+ }
91
+
86
92
Database .Path = sec .Key ("PATH" ).MustString (filepath .Join (AppDataPath , "gitea.db" ))
87
93
Database .Timeout = sec .Key ("SQLITE_TIMEOUT" ).MustInt (500 )
88
94
Database .MaxIdleConns = sec .Key ("MAX_IDLE_CONNS" ).MustInt (2 )
You can’t perform that action at this time.
0 commit comments