Bug 4190: messages in patron account did not work with branchcodes >4
authorKoha <koha@koha-dev.de>
Tue, 15 Dec 2009 23:50:54 +0000 (00:50 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 17 Mar 2010 00:58:54 +0000 (20:58 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 4ddcbd5..1d5cba9 100644 (file)
@@ -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,
index 02239f9..e21b37c 100755 (executable)
@@ -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
index 36f59f4..50f5ef4 100644 (file)
@@ -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