From de0bba99dc6a41a93677b2e11e1d649ccf2d3562 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Sun, 16 Aug 2009 13:51:39 -0400 Subject: [PATCH] BUG 2761 Fix max length of itemcallnumber to 255 Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0722a52d6b..83f827f766 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index aee7bec374..4d93a2876d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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'; -- 2.39.5