Koha-clms/installer/data/mysql
Jonathan Druart 6f4cbc8dad Bug 17676: Update default COLLATE of marc_subfield_structure
(This issue has been raised on bug 17216 comments 93-103)
On bug 11944 (3.19.00.006) we updated the default COLLATE for all our tables to
utf8_unicode_ci but not the marc_subfield_structure table.
Indeed we want to keep tagsubfield a utf8_bin (to allow lowercase and uppercase
of the same letter for subfields).
We should have set the default collate to utf8_unicode_ci for further changes.

This patch updates the DB entry 3.19.00.006 to set the default COLLATE to this
table (for people upgrading from prior to 3.19.00.006) and set this
default COLLATE on 16.06.00.033 (for people upgrading from after 3.19.00.006).

The error is:
DBD::mysql::db do failed: Can't create table `koha_kohadev`.`#sql-306_9f9` (errno: 150 "Foreign key constraint is incorrectly formed") [for Statement "
            ALTER TABLE marc_subfield_structure
            MODIFY COLUMN authorised_value VARCHAR(32) DEFAULT NULL,
            ADD CONSTRAINT marc_subfield_structure_ibfk_1 FOREIGN KEY (authorised_value) REFERENCES authorised_value_categories (category_name) ON UPDATE CASCADE ON DELETE SET NULL;
            "] at installer/data/mysql/updatedatabase.pl line 13175.
Upgrade to 16.06.00.033 done (Bug 17216 - Add a new table to store authorized value categories)

Test plan:
1/ git checkout v3.18.00
2/ Do an install
3/ git checkout master;
4/ perl installer/data/mysql/updatedatabase.pl
=> Without this patch, you get the error
=> With this patch applied you will not get it and the default COLLATE for
marc_subfield_structure will be correctly set. Make sure tagsubfield is
still utf8_bin

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Will put some notes on the Bugzilla report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-29 17:41:34 +00:00
..
atomicupdate Bug 8835 - DBRev 16.06.00.050 2016-11-22 17:45:35 +00:00
de-DE Bug 17543: Update German web installer sample files for 16.11 2016-11-18 15:55:03 +00:00
en Bug 5260: QA follow-up - Add sample ACQORDER notice to sample notices 2016-10-28 11:52:27 +00:00
es-ES Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
fr-CA Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
fr-FR Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
it-IT Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
mandatory Bug 17518: Displayed language name for Czech is wrong 2016-11-02 11:00:35 +00:00
nb-NO Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
pl-PL Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
ru-RU Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
uk-UA Bug 17576: Add housebound mandatory auth_values. 2016-11-18 13:55:23 +00:00
audio_alerts.sql Bug 11431: (QA followup) Make audio alerts sql top level 2015-11-04 12:33:53 -03:00
backfill_statistics.pl Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17135: [QA Follow-up] Changes as to reporting 2016-09-16 10:47:03 +00:00
kohastructure.sql Bug 15581: Add a circ rule to limit the auto renewals given a delay 2016-11-02 10:28:57 +00:00
labels_upgrade.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
patroncards_upgrade.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
sysprefs.sql Bug 17391: Fix number of values in sysprefs.sql 2016-11-22 11:36:07 +00:00
update22to30.pl Bug 11398: A typo occurred with occured 2014-01-02 15:12:48 +00:00
updatedatabase.pl Bug 17676: Update default COLLATE of marc_subfield_structure 2016-11-29 17:41:34 +00:00
userflags.sql Bug 13632: Populate user_flags and permissions tables in the web installer 2015-10-19 09:38:04 -03:00
userpermissions.sql Bug 17663: Forgotten userpermissions from bug 14686 2016-11-21 16:33:16 +00:00