We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dca09f8 commit 7a0a789Copy full SHA for 7a0a789
models/db/convert.go
@@ -6,6 +6,7 @@ package db
6
import (
7
"fmt"
8
"strconv"
9
+ "strings"
10
11
"code.gitea.io/gitea/modules/log"
12
"code.gitea.io/gitea/modules/setting"
@@ -34,6 +35,10 @@ func ConvertUtf8ToUtf8mb4() error {
34
35
return err
36
}
37
38
+ if strings.HasPrefix(table.Collation, "utf8mb4") {
39
+ fmt.Printf("skip table %q because it is already using utf8mb4\n", table.Name)
40
+ continue
41
+ }
42
if _, err := x.Exec(fmt.Sprintf("ALTER TABLE `%s` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;", table.Name)); err != nil {
43
44
0 commit comments