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

Move to utf8mb4_unicode_ci for default MySQL collation #1763

Closed
MasterOdin opened this issue May 9, 2020 · 1 comment
Closed

Move to utf8mb4_unicode_ci for default MySQL collation #1763

MasterOdin opened this issue May 9, 2020 · 1 comment
Labels
enhancement major BC breaking / next major
Milestone

Comments

@MasterOdin
Copy link
Member

MasterOdin commented May 9, 2020

A proposal for Phinx 0.13.x release, as this is a breaking change.

Currently, the default collation for a table is utf8_general_ci (https://github.com/cakephp/phinx/blob/master/src/Phinx/Db/Adapter/MysqlAdapter.php#L243). This is a legacy collation that has a broken utf8 implementation that should be avoided. While utf8mb4_general_ci does exist and is "faster" as it takes various shortcuts on sorting (which can resort in wrong sorts in a number of cases), this speed-up is almost negligible on any modern machine that there's no reason to suggest it. As such, it should be that utf8mb4_unicode_ci is used as the default and then for anyone who wants something different, an override option is provided.

@dereuromark
Copy link
Member

I prepared 0.next ( https://github.com/cakephp/phinx/tree/0.next ), so we can do all those things in there now as prep for a future 0.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement major BC breaking / next major
Projects
None yet
Development

No branches or pull requests

2 participants