updatedatabase for itype.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Ryan Higgins 2007-11-11 16:39:28 -06:00 committed by Joshua Ferraro
parent 805d8c8f4d
commit 53a1186d55
2 changed files with 11 additions and 1 deletions

View file

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

View file

@ -576,6 +576,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.00.00.025";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE items ADD COLUMN itype VARCHAR(10)");
if(C4::Context->preference('item-level_itypes')){
$dbh->do('update items,biblioitems set items.itype=biblioitems.itemtype where items.biblionumber=biblioitems.biblionumber and itype is null');
}
print "Upgrade to $DBversion done (reintroduce items.itype - fill from itemtype)\n ";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)