-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
!!!TASK: Change default charset and collation to utf8mb4 #1991
Conversation
This changes the charset and collation to create table statements in the existing migrations. This make sure the tables are set up correctly independent of the database default configuration. This is breaking if you have existing tables that do not use ut8mb4 as charset and utf8mb4_unicode_ci as collation. To solve this you need to convert the existing tables. This can be done using the command:: ./flow database:setcharset This will convert the database configured in the settings and all tables inside to use a default character set of utf8mb4 and a default collation of utf8mb4_unicode_ci. It will also convert all character type columns to that combination of charset and collation. Background information on why this is done can be found in https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434
See neos/flow-development-collection#1268 for all related PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good by reading
* PHP >= 7.0.0 (make sure the PHP CLI has the same version) | ||
* A Database (MySQL > 5.7.7, MariaDB > 10.2.2 and PostgreSQL > 9.4 are preferred | ||
but any `Database supported by Doctrine DBAL <http://www.doctrine-project.org/projects/dbal.html>`_ | ||
should work as well). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true ? as we don't provide migration for other DB engine ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not tested, but should work. I know I have seen Neos on other engines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all boils down to creating your own migrations and/or using doctrine:update
🙈
This changes the charset and collation to create table statements in the
existing migrations. This make sure the tables are set up correctly
independent of the database default configuration.
This is breaking if you have existing tables that do not use ut8mb4 as
charset and utf8mb4_unicode_ci as collation. To solve this you need to
convert the existing tables. This can be done using the command::
./flow database:setcharset
This will convert the database configured in the settings and all tables
inside to use a default character set of utf8mb4 and a default collation
of utf8mb4_unicode_ci. It will also convert all character type columns
to that combination of charset and collation.
Background information on why this is done can be found in
https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434