This patch adapts the DB structure so it uses utf8mb4 encoding and
utf8mb4_generic_ci collation.
Indexes for columns of type VARCHAR with prefix lenght higher than 191
are shortened because of the smaller max index lenght for utf8mb4
Note: please beware that testing this patchset risks your data and the
patchset includes reinitializing the DB.
To test:
- Be on the master branch
- Have a clean DB:
$ reset_all
(y)
- Apply the first patch (Unit tests)
- Run:
$ kshell
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> FAIL: Tests fail because Koha doesn't support supplemental (UTF-8)
chars.
- Apply the rest of this patchset
- Upgrade the schema:
$ kshell
k$ perl installer/data/mysql/updatedatabase.pl
- Run the tests:
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!
- Now start from a clean DB
- Run:
$ reset_all
(y)
- Run the tests:
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!
Verify you can use emojis all over the place (MARC records, AV
descriptions, etc).
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>