Bug 13810: Change collate for tagsubfield (utf8_bin)
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 27 Apr 2015 10:38:40 +0000 (12:38 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 4 May 2015 14:28:13 +0000 (11:28 -0300)
commit881b6fbf40c70516dd46f31c8de99f0e203c1355
tree99648ad1a21baae6cd51926ec99ddaa5d5a7c009
parent006bae1b7f797824757e0e5c7fa04a42cd33e696
Bug 13810: Change collate for tagsubfield (utf8_bin)

Before bug 11944, the marc_subfield_structure.tagsubfield column had a
specific collate: utf8_bin. It has been introduced by
  commit 67e20d82ffdfcd69344ec30696bebc51c00d863c
  Date:   Sun Jun 22 16:35:48 2008 -0500
      DB Bump 094 - bug 2268 -- allow mixed case subfield labels in MARC21
      by changing db column collation.

This change should be kept and Koha should continue to allow and create
subfields with the same letter but different case sensitivity.

What does this patch:
1/ To prevent the updatedatabase entry 3.19.00.006 to fail if subfields
with different case sensitivity already exist in the DB, the table is
managed separately from others.
2/ To update DB which have already pass this dbrev, a new entry will be
create to update the specific collate for this column.

Test plan:
1/ a. With a 3.18 DB, create subfield 'a' and 'A' for the same field
   b. Execute the updatedatabase.pl script. 3.19.00.006 should not fail
      anymore
2/ a. With a master DB (3.19.00.006 has already been executed), create
subfields 'a' and 'A'. You should get an error.
   b. Apply this patch, execute the DB entry and try again 2/a. you
   should be able to create the second subfield.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
installer/data/mysql/atomicupdate/bug_13810-modify_tagfield_collate_utf8_bin.sql [new file with mode: 0644]
installer/data/mysql/updatedatabase.pl