1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-25 03:38:36 +00:00

Refactor push mirror find and add check for updating push mirror (#32539) (#32549)

backport #32539

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Lunny Xiao
2024-11-18 07:55:27 -08:00
committed by GitHub
parent 578c02d652
commit 673fee427e
8 changed files with 145 additions and 106 deletions

View File

@@ -68,7 +68,8 @@ func CheckCollations(x *xorm.Engine) (*CheckCollationsResult, error) {
var candidateCollations []string
if x.Dialect().URI().DBType == schemas.MYSQL {
if _, err = x.SQL("SELECT @@collation_database").Get(&res.DatabaseCollation); err != nil {
_, err = x.SQL("SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ?", setting.Database.Name).Get(&res.DatabaseCollation)
if err != nil {
return nil, err
}
res.IsCollationCaseSensitive = func(s string) bool {