Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 2.01 KB

7.2.md

File metadata and controls

33 lines (25 loc) · 2.01 KB

Upgrade steps from 7.1 to 7.2

See doc/bc/changes-7.2.md for requirements changes and deprecations.

MySQL/MariaDB database tables character set change

The character set for MySQL/MariaDB database tables should be changed from utf8 to utf8mb4 to support 4-byte characters. See data/update/mysql/dbupdate-7.1.0-to-7.2.0.sql for the statements that shorten table indexes, these must be run first. If you use DFS, see also data/update/mysql/dbupdate-7.1.0-to-7.2.0-dfs.sql for additional SQL statements. Beware that these upgrade statements may fail due to index collisions, which may occur when indexes are shortened. If that happens, you must remove the duplicates manually, and then repeat the statements that failed.

After successfully running those statements, change the character set of each table to utf8mb4. This can be done as shown below, for each of the standard tables in eZ Platform, and for any custom table you may want to convert. You may specify a collation; if you don't, the default collation for utf8mb4 will be used. We recommend specifying utf8mb4_unicode_520_ci, which is able to tell different emojis apart, though you may have other requirements.

To get a list of tables, enter the SQL command show tables;. For each of the tables you want to convert, replace tbl_name with the name of the table to convert:

-- Example using utf8mb4_unicode_520_ci collation
ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;

You should also change the character set that is specified in the application config, and in legacy if you use that.

In app/config/config.yml, set the following:

doctrine:
    dbal:
        connections:
            default:
                charset: utf8mb4

Also make the corresponding change in app/config/dfs/dfs.yml.

For legacy, in ezpublish_legacy/settings/site.ini, set the following:

[DatabaseSettings]
Charset=utf8mb4