Lines 8603-8608
if ( CheckVersion($DBversion) ) {
Link Here
|
8603 |
SetVersion($DBversion); |
8603 |
SetVersion($DBversion); |
8604 |
} |
8604 |
} |
8605 |
|
8605 |
|
|
|
8606 |
$DBversion = "3.15.00.XXX"; |
8607 |
if ( CheckVersion($DBversion) ) { |
8608 |
my $count_l = $dbh->selectcol_arrayref(q| |
8609 |
SELECT COUNT(*) FROM letter WHERE message_transport_type='feed' |
8610 |
|); |
8611 |
my $count_mq = $dbh->selectcol_arrayref(q| |
8612 |
SELECT COUNT(*) FROM message_queue WHERE message_transport_type='feed' |
8613 |
|); |
8614 |
my $count_ott = $dbh->selectcol_arrayref(q| |
8615 |
SELECT COUNT(*) FROM overduerules_transport_types WHERE message_transport_type='feed' |
8616 |
|); |
8617 |
my $count_mt = $dbh->selectcol_arrayref(q| |
8618 |
SELECT COUNT(*) FROM message_transports WHERE message_transport_type='feed' |
8619 |
|); |
8620 |
my $count_bmtp = $dbh->selectcol_arrayref(q| |
8621 |
SELECT COUNT(*) FROM borrower_message_transport_preferences WHERE message_transport_type='feed' |
8622 |
|); |
8623 |
|
8624 |
my $deleted = 0; |
8625 |
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 ) { |
8626 |
$deleted = $dbh->do(q| |
8627 |
DELETE FROM message_transport_types where message_transport_type='feed' |
8628 |
|); |
8629 |
$deleted = $deleted ne '0E0' ? 1 : 0; |
8630 |
} |
8631 |
|
8632 |
print "Upgrade to $DBversion done (Bug 12298: Delete the 'feed' message transport type " . ($deleted ? '(deleted!)' : '(not deleted)') . ")\n"; |
8633 |
SetVersion($DBversion); |
8634 |
} |
8635 |
|
8606 |
=head1 FUNCTIONS |
8636 |
=head1 FUNCTIONS |
8607 |
|
8637 |
|
8608 |
=head2 TableExists($table) |
8638 |
=head2 TableExists($table) |
8609 |
- |
|
|