|
Lines 5343-5348
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
| 5343 |
SetVersion($DBversion); |
5343 |
SetVersion($DBversion); |
| 5344 |
} |
5344 |
} |
| 5345 |
|
5345 |
|
|
|
5346 |
$DBversion = '3.09.00.XXX'; |
| 5347 |
if (C4::Context->preference("Version") < TransformToNum($DBversion)) { |
| 5348 |
$dbh->do("ALTER TABLE `statistics` ADD `ccode` VARCHAR( 80 ) NULL ;"); |
| 5349 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( SELECT items.ccode FROM items WHERE statistics.itemnumber = items.itemnumber )"); |
| 5350 |
$dbh->do("UPDATE statistics SET statistics.ccode = ( |
| 5351 |
SELECT deleteditems.ccode FROM deleteditems |
| 5352 |
WHERE statistics.itemnumber = deleteditems.itemnumber |
| 5353 |
) WHERE statistics.ccode IS NULL"); |
| 5354 |
print "Upgrade done ( Added Category Code to Statistics table. )\n"; |
| 5355 |
SetVersion ($DBversion); |
| 5356 |
} |
| 5357 |
|
| 5346 |
=head1 FUNCTIONS |
5358 |
=head1 FUNCTIONS |
| 5347 |
|
5359 |
|
| 5348 |
=head2 TableExists($table) |
5360 |
=head2 TableExists($table) |
|
Lines 5362-5367
sub TableExists {
Link Here
|
| 5362 |
|
5374 |
|
| 5363 |
=head2 DropAllForeignKeys($table) |
5375 |
=head2 DropAllForeignKeys($table) |
| 5364 |
|
5376 |
|
|
|
5377 |
|
| 5378 |
=item DropAllForeignKeys($table) |
| 5379 |
|
| 5365 |
Drop all foreign keys of the table $table |
5380 |
Drop all foreign keys of the table $table |
| 5366 |
|
5381 |
|
| 5367 |
=cut |
5382 |
=cut |
| 5368 |
- |
|
|