[Koha-patches] [PATCH] Bug 4190: messages in patron account did not work with branchcodes >4
Katrin Fischer
Katrin.fischer.83 at web.de
Thu Mar 4 23:02:21 CET 2010
From: Koha <koha at koha-dev.de>
---
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 4ddcbd5..1d5cba9 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 e6f3f9f..61693d8 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3520,6 +3520,13 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){
SetVersion ($DBversion);
}
+$DBversion = '3.01.00.xxx';
+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 c1edc2e..dfa8a32 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.124';
+ our $VERSION = '3.01.00.xxx';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
--
1.6.3.3
More information about the Koha-patches
mailing list