Skip to content

Move to utf8mb4_unicode_ci for default MySQL collation #1763

@MasterOdin

Description

@MasterOdin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions