bug 2872: fix width of columns in branch_transfer_limits (DB rev 031)

change itemtype, tobranch, and frombranch from varchar(4)
to varchar(10)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Galen Charlton 2009-05-11 12:22:46 -05:00
parent 21625b74bf
commit b79f8feed2
3 changed files with 14 additions and 4 deletions

View File

@ -2338,9 +2338,9 @@ CREATE TABLE `borrower_message_transport_preferences` (
DROP TABLE IF EXISTS `branch_transfer_limits`;
CREATE TABLE branch_transfer_limits (
limitId int(8) NOT NULL auto_increment,
toBranch varchar(4) NOT NULL,
fromBranch varchar(4) NOT NULL,
itemtype varchar(4) NULL,
toBranch varchar(10) NOT NULL,
fromBranch varchar(10) NOT NULL,
itemtype varchar(10) NULL,
ccode varchar(10) NULL,
PRIMARY KEY (limitId)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -2396,6 +2396,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.01.00.031";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE branch_transfer_limits
MODIFY toBranch varchar(10) NOT NULL,
MODIFY fromBranch varchar(10) NOT NULL,
MODIFY itemtype varchar(10) NULL");
print "Upgrade to $DBversion done (fix column widths in branch_transfer_limits)\n";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table

View File

@ -10,7 +10,7 @@
use strict;
sub kohaversion {
our $VERSION = '3.01.00.030';
our $VERSION = '3.01.00.031';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install