]> git.koha-community.org Git - koha.git/commit
Bug 18336: Convert schema from utf8 to utf8mb4
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 22 Jan 2018 15:32:36 +0000 (12:32 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Feb 2018 20:53:42 +0000 (17:53 -0300)
commitc655a2000a87e0b7ff07ecee1be4f7b6eddad0f4
tree82620cff58443dd5bbfe4c9d9d3f615cddc2f353
parent6a7341c98d84a59807ae4a74c9c28343979a081b
Bug 18336: Convert schema from utf8 to utf8mb4

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>
installer/data/mysql/kohastructure.sql