[Koha-patches] [PATCH] bug 2611, 2761 followup

Galen Charlton gmcharlt at gmail.com
Mon Aug 24 01:07:13 CEST 2009


* set DB changes as revs 047 and 048
* ensured that itemcallnumber was widened to 255 in items and
  tmp_holdsqueue
* adjusted DB update descriptions

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 installer/data/mysql/kohastructure.sql |    4 ++--
 installer/data/mysql/updatedatabase.pl |   20 +++++++++++---------
 kohaversion.pl                         |    2 +-
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index 83f827f..0cf3d5b 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -1177,7 +1177,7 @@ CREATE TABLE `items` (
   `damaged` tinyint(1) NOT NULL default 0,
   `itemlost` tinyint(1) NOT NULL default 0,
   `wthdrawn` tinyint(1) NOT NULL default 0,
-  `itemcallnumber` varchar(30) default NULL,
+  `itemcallnumber` varchar(255) default NULL,
   `issues` smallint(6) default NULL,
   `renewals` smallint(6) default NULL,
   `reserves` smallint(6) default NULL,
@@ -2238,7 +2238,7 @@ CREATE TABLE `tmp_holdsqueue` (
   `cardnumber` varchar(16) default NULL,
   `reservedate` date default NULL,
   `title` mediumtext,
-  `itemcallnumber` varchar(30) default NULL,
+  `itemcallnumber` varchar(255) default NULL,
   `holdingbranch` varchar(10) default NULL,
   `pickbranch` varchar(10) default NULL,
   `notes` text,
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index c34e19a..77e1478 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2505,13 +2505,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 
 $DBversion = '3.01.00.042';
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
-    $dbh->do("ALTER TABLE items MODIFY itemcallnumber varchar(255);");
-    SetVersion ($DBversion);
-    print " Upgrade to $DBversion done (change max length of itemcallnumber to 255 from 30.)\n";
-}
-
-$DBversion = '3.01.00.042';
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACFineNoRenewals','99999','Fine Limit above which user canmot renew books via OPAC','','Integer')");
     SetVersion ($DBversion);
     print "Upgrade to $DBversion done (added OPACFineNoRenewals syspref)\n";
@@ -2554,7 +2547,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
-$DBversion = '3.01.00.043';
+$DBversion = '3.01.00.047';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("ALTER TABLE items MODIFY itemcallnumber varchar(255);");
+    $dbh->do("ALTER TABLE deleteditems MODIFY itemcallnumber varchar(255);");
+    $dbh->do("ALTER TABLE tmp_holdsqueue MODIFY itemcallnumber varchar(255);");
+    SetVersion ($DBversion);
+    print " Upgrade to $DBversion done (bug 2761: change max length of itemcallnumber to 255 from 30)\n";
+}
+
+$DBversion = '3.01.00.048';
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("UPDATE userflags SET flagdesc='View Catalog (Librarian Interface)' WHERE bit=2;");
     $dbh->do("UPDATE userflags SET flagdesc='Edit Catalog (Modify bibliographic/holdings data)' WHERE bit=9;");
@@ -2562,7 +2564,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("UPDATE userflags SET flagdesc='Allow to access to the reports module' WHERE bit=16;");
     $dbh->do("UPDATE userflags SET flagdesc='Allow to manage serials subscriptions' WHERE bit=15;");
     SetVersion ($DBversion);
-    print " Upgrade to $DBversion done (fix spelling/capitalization to make things match the standard.)\n";
+    print " Upgrade to $DBversion done (bug 2611: fix spelling/capitalization in permission flag descriptions)\n";
 }
 
 =item DropAllForeignKeys($table)
diff --git a/kohaversion.pl b/kohaversion.pl
index e4f481e..9905147 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.01.00.046';
+    our $VERSION = '3.01.00.048';
     # 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