From d60383e0b9fa11c1143e35a357330c9db1f61d78 Mon Sep 17 00:00:00 2001 From: Koha Date: Wed, 16 Dec 2009 00:50:54 +0100 Subject: [PATCH] Bug 4190: messages in patron account did not work with branchcodes >4 Signed-off-by: Galen Charlton --- 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 4ddcbd5c66..1d5cba9e9f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2224,7 +2224,7 @@ CREATE TABLE `item_circulation_alert_preferences` ( CREATE TABLE `messages` ( `message_id` int(11) NOT NULL auto_increment, `borrowernumber` int(11) NOT NULL, - `branchcode` varchar(4) default NULL, + `branchcode` varchar(10) default NULL, `message_type` varchar(1) NOT NULL, `message` text NOT NULL, `message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 02239f9329..e21b37c77d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3541,6 +3541,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.127'; +if (C4::Context->preference('Version') < TransformToNum($DBversion)){ + $dbh->do("ALTER TABLE messages CHANGE branchcode branchcode varchar(10);"); + print "Upgrade to $DBversion done (bug 4190: messages in patron account did not work with branchcodes > 4)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 36f59f47d1..50f5ef4bb8 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.126'; + our $VERSION = '3.01.00.127'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5