From 67e20d82ffdfcd69344ec30696bebc51c00d863c Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 22 Jun 2008 16:35:48 -0500 Subject: [PATCH] DB Bump 094 - bug 2268 -- allow mixed case subfield labels in MARC21 by changing db column collation. Signed-off-by: Joshua Ferraro --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ kohaversion.pl | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index c48d3ec63c..f652e503e4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1268,7 +1268,7 @@ CREATE TABLE `letter` ( DROP TABLE IF EXISTS `marc_subfield_structure`; CREATE TABLE `marc_subfield_structure` ( `tagfield` varchar(3) NOT NULL default '', - `tagsubfield` varchar(1) NOT NULL default '', + `tagsubfield` varchar(1) NOT NULL default '' COLLATE utf8_bin, `liblibrarian` varchar(255) NOT NULL default '', `libopac` varchar(255) NOT NULL default '', `repeatable` tinyint(4) NOT NULL default 0, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7d095bf930..807d83d2c2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1808,6 +1808,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.094"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `marc_subfield_structure` MODIFY `tagsubfield` VARCHAR(1) NOT NULL DEFAULT '' COLLATE utf8_bin"); + print "Upgrade to $DBversion done (Change Collation of marc_subfield_structure to allow mixed case in subfield labels.)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index f0e7806935..1a0f8da0e2 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = "3.00.00.093"; + our $VERSION = "3.00.00.094"; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5