Lines 8471-8476
if ( CheckVersion($DBversion) ) {
Link Here
|
8471 |
SetVersion($DBversion); |
8471 |
SetVersion($DBversion); |
8472 |
} |
8472 |
} |
8473 |
|
8473 |
|
|
|
8474 |
$DBversion = "3.15.00.XXX"; |
8475 |
if ( CheckVersion($DBversion) ) { |
8476 |
my $count_l = $dbh->selectcol_arrayref(q| |
8477 |
SELECT COUNT(*) FROM letter WHERE message_transport_type='feed' |
8478 |
|); |
8479 |
my $count_mq = $dbh->selectcol_arrayref(q| |
8480 |
SELECT COUNT(*) FROM message_queue WHERE message_transport_type='feed' |
8481 |
|); |
8482 |
my $count_ott = $dbh->selectcol_arrayref(q| |
8483 |
SELECT COUNT(*) FROM overduerules_transport_types WHERE message_transport_type='feed' |
8484 |
|); |
8485 |
my $count_mt = $dbh->selectcol_arrayref(q| |
8486 |
SELECT COUNT(*) FROM message_transports WHERE message_transport_type='feed' |
8487 |
|); |
8488 |
my $count_bmtp = $dbh->selectcol_arrayref(q| |
8489 |
SELECT COUNT(*) FROM borrower_message_transport_preferences WHERE message_transport_type='feed' |
8490 |
|); |
8491 |
|
8492 |
my $deleted = 0; |
8493 |
if ( $count_l->[0] == 0 and $count_mq->[0] == 0 and $count_ott->[0] == 0 and $count_mt->[0] == 0 and $count_bmtp->[0] == 0 ) { |
8494 |
$deleted = $dbh->do(q| |
8495 |
DELETE FROM message_transport_types where message_transport_type='feed' |
8496 |
|); |
8497 |
$deleted = $deleted ne '0E0' ? 1 : 0; |
8498 |
} |
8499 |
|
8500 |
print "Upgrade to $DBversion done (Bug 12298: Delete the 'feed' message transport type " . ($deleted ? '(deleted!)' : '(not deleted)') . ")\n"; |
8501 |
SetVersion($DBversion); |
8502 |
} |
8503 |
|
8474 |
=head1 FUNCTIONS |
8504 |
=head1 FUNCTIONS |
8475 |
|
8505 |
|
8476 |
=head2 TableExists($table) |
8506 |
=head2 TableExists($table) |
8477 |
- |
|
|