BUG 2761 Fix max length of itemcallnumber to 255
authorNicole Engard <nengard@gmail.com>
Sun, 16 Aug 2009 17:51:39 +0000 (13:51 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Sun, 23 Aug 2009 22:50:11 +0000 (18:50 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index 0722a52..83f827f 100644 (file)
@@ -936,7 +936,7 @@ CREATE TABLE `deleteditems` (
   `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,
index aee7bec..4d93a28 100755 (executable)
@@ -2500,7 +2500,14 @@ $DBversion = '3.01.00.041';
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSPrivateKey','','See:  http://aws.amazon.com.  Note that this is required after 2009/08/15 in order to retrieve any enhanced content other than book covers from Amazon.','','free')");
     SetVersion ($DBversion);
-    print "Upgrade to $DBversion done (added AWSPrivateKey syspref - note that if you use enhanced content from Amazon, this should be set right away.)";
+    print "Upgrade to $DBversion done (added AWSPrivateKey syspref - note that if you use enhanced content from Amazon, this should be set right away.)\n";
+}
+
+$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';