extended missed branchcode columns to 10 chars

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Mason James 2007-11-08 00:42:37 -06:00 committed by Joshua Ferraro
parent f08492ae90
commit 929fa79054
2 changed files with 16 additions and 1 deletions

View file

@ -8,7 +8,7 @@
# and is automatically called by Auth.pm when needed. # and is automatically called by Auth.pm when needed.
sub kohaversion { sub kohaversion {
return "3.00.00.020"; return "3.00.00.021";
} }
1; 1;

View file

@ -543,6 +543,21 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion); SetVersion ($DBversion);
} }
$DBversion = "3.00.00.021";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE items CHANGE homebranch homebranch VARCHAR(10)");
$dbh->do("ALTER TABLE deleteditems CHANGE homebranch homebranch VARCHAR(10)");
$dbh->do("ALTER TABLE statistics CHANGE branch branch VARCHAR(10)");
$dbh->do("ALTER TABLE subscription CHANGE lastbranch lastbranch VARCHAR(10)");
print "Upgrade to $DBversion done (extended missed branchcode columns to 10 chars)\n";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table) =item DropAllForeignKeys($table)
Drop all foreign keys of the table $table Drop all foreign keys of the table $table