Lines 5452-5457
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
5452 |
SetVersion($DBversion); |
5452 |
SetVersion($DBversion); |
5453 |
} |
5453 |
} |
5454 |
|
5454 |
|
|
|
5455 |
$DBversion = '3.09.00.XXX'; |
5456 |
if (C4::Context->preference("Version") < TransformToNum($DBversion)) { |
5457 |
$dbh->do("ALTER TABLE `statistics` ADD `ccode` VARCHAR( 80 ) NULL ;"); |
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 = ( |
5460 |
SELECT deleteditems.ccode FROM deleteditems |
5461 |
WHERE statistics.itemnumber = deleteditems.itemnumber |
5462 |
) WHERE statistics.ccode IS NULL"); |
5463 |
print "Upgrade done ( Added Category Code to Statistics table. )\n"; |
5464 |
SetVersion ($DBversion); |
5465 |
} |
5466 |
|
5455 |
=head1 FUNCTIONS |
5467 |
=head1 FUNCTIONS |
5456 |
|
5468 |
|
5457 |
=head2 TableExists($table) |
5469 |
=head2 TableExists($table) |
Lines 5471-5476
sub TableExists {
Link Here
|
5471 |
|
5483 |
|
5472 |
=head2 DropAllForeignKeys($table) |
5484 |
=head2 DropAllForeignKeys($table) |
5473 |
|
5485 |
|
|
|
5486 |
|
5487 |
=item DropAllForeignKeys($table) |
5488 |
|
5474 |
Drop all foreign keys of the table $table |
5489 |
Drop all foreign keys of the table $table |
5475 |
|
5490 |
|
5476 |
=cut |
5491 |
=cut |
5477 |
- |
|
|