Lines 5454-5466
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
5454 |
|
5454 |
|
5455 |
$DBversion = '3.09.00.XXX'; |
5455 |
$DBversion = '3.09.00.XXX'; |
5456 |
if (C4::Context->preference("Version") < TransformToNum($DBversion)) { |
5456 |
if (C4::Context->preference("Version") < TransformToNum($DBversion)) { |
5457 |
$dbh->do("ALTER TABLE `statistics` ADD `ccode` VARCHAR( 80 ) NULL ;"); |
5457 |
$dbh->do("ALTER TABLE statistics ADD COLUMN ccode VARCHAR ( 10 ) NULL AFTER associatedborrower"); |
5458 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber )"); |
5458 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber )"); |
5459 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( |
5459 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( |
5460 |
SELECT deleteditems.ccode FROM deleteditems |
5460 |
SELECT deleteditems.ccode FROM deleteditems |
5461 |
WHERE statistics.itemnumber = deleteditems.itemnumber |
5461 |
WHERE statistics.itemnumber = deleteditems.itemnumber |
5462 |
) WHERE statistics.ccode IS NULL"); |
5462 |
) WHERE statistics.ccode IS NULL"); |
5463 |
print "Upgrade done ( Added Category Code to Statistics table. )\n"; |
5463 |
print "Upgrade done ( Added Collection Code to Statistics table. )\n"; |
5464 |
SetVersion ($DBversion); |
5464 |
SetVersion ($DBversion); |
5465 |
} |
5465 |
} |
5466 |
|
5466 |
|
5467 |
- |
|
|