1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Recommend/convert to use case-sensitive collation for MySQL/MSSQL (#28662)

Mainly for MySQL/MSSQL.

It is important for Gitea to use case-sensitive database charset
collation. If the database is using a case-insensitive collation, Gitea
will show startup error/warning messages, and show the errors/warnings
on the admin panel's Self-Check page.

Make `gitea doctor convert` work for MySQL to convert the collations of
database & tables & columns.

* Fix #28131

## ⚠️ BREAKING ⚠️

It is not quite breaking, but it's highly recommended to convert the
database&table&column to a consistent and case-sensitive collation.
This commit is contained in:
wxiaoguang
2024-01-10 19:03:23 +08:00
committed by GitHub
parent a80debc208
commit 2df7563f31
21 changed files with 439 additions and 186 deletions

View File

@ -2691,6 +2691,7 @@ teams.invite.description = Please click the button below to join the team.
[admin]
dashboard = Dashboard
self_check = Self Check
identity_access = Identity & Access
users = User Accounts
organizations = Organizations
@ -3216,6 +3217,13 @@ notices.desc = Description
notices.op = Op.
notices.delete_success = The system notices have been deleted.
self_check.no_problem_found = No problem found yet.
self_check.database_collation_mismatch = Expect database to use collation: %s
self_check.database_collation_case_insensitive = Database is using a collation %s, which is an insensitive collation. Although Gitea could work with it, there might be some rare cases which don't work as expected.
self_check.database_inconsistent_collation_columns = Database is using collation %s, but these columns are using mismatched collations. It might cause some unexpected problems.
self_check.database_fix_mysql = For MySQL/MariaDB users, you could use the "gitea doctor convert" command to fix the collation problems, or you could also fix the problem by "ALTER ... COLLATE ..." SQLs manually.
self_check.database_fix_mssql = For MSSQL users, you could only fix the problem by "ALTER ... COLLATE ..." SQLs manually at the moment.
[action]
create_repo = created repository <a href="%s">%s</a>
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>