Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert branch table name column to a new collation for mysql/mssql to support case sensitive because branch names are case sensitive #25623

Closed

Conversation

lunny
Copy link
Member

@lunny lunny commented Jul 2, 2023

Git branch names are case sensitive. Since #22743 introduced branch name in database and mysql/mssql default collation are case insensitive, this PR converts the column to a case sensitive collation.

Fixes: #25909

…o support case sensitive because branch names are case sensitive
@lunny lunny added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Jul 2, 2023
@lunny lunny added this to the 1.21.0 milestone Jul 2, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 2, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 2, 2023
}
} else if setting.Database.Type.IsMSSQL() {
return []*schemas.Collation{
{Name: "Latin1_General_CS_AS", Column: "name"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC SQLServer doesn't treat this collation as UTF-8 internally.

So it's better to add a test for it to make sure wide UTF-8 chars (eg: emoji) can be inserted and selected correctly.

@silverwind
Copy link
Member

Reference to #25909 added.

@silverwind
Copy link
Member

Might be good to add a test of a repo migration when case-differing branch name, e.g. Foo and foo.

@wxiaoguang
Copy link
Contributor

-> Make table column branch.name case sensitive #28633

@lunny
Copy link
Member Author

lunny commented Dec 28, 2023

replaced by #28633

@lunny lunny closed this Dec 28, 2023
@GiteaBot GiteaBot removed this from the 1.22.0 milestone Dec 28, 2023
@lunny lunny deleted the lunny/convert_branch_name_collation branch December 28, 2023 12:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to migrate repos with duplicate case-different tags
5 participants