[Koha-bugs] [Bug 33800] Error 500 in issues_stats.pl
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jun 28 17:03:15 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33800
--- Comment #5 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Here is a pointer:
$DBversion = '20.06.00.041';
if ( CheckVersion($DBversion) ) {
if ( column_exists( 'items', 'paidfor' ) ) {
my ($count) = $dbh->selectrow_array(
q|
SELECT COUNT(*)
FROM items
WHERE paidfor IS NOT NULL AND paidfor <> ""
|
);
if ($count) {
warn "Warning - Cannot remove column items.paidfor. At least one
value exists";
}
else {
$dbh->do(q|ALTER TABLE items DROP COLUMN paidfor|);
$dbh->do(q|UPDATE marc_subfield_structure SET kohafield = '' WHERE
kohafield = 'items.paidfor'|);
}
}
if ( column_exists( 'deleteditems', 'paidfor' ) ) {
my ($count) = $dbh->selectrow_array(
q|
SELECT COUNT(*)
FROM deleteditems
WHERE paidfor IS NOT NULL AND paidfor <> ""
|
);
if ($count) {
warn "Warning - Cannot remove column deleteditems.paidfor. At least
one value exists";
}
else {
$dbh->do(q|ALTER TABLE deleteditems DROP COLUMN paidfor|);
}
}
NewVersion( $DBversion, 26268, "Remove items.paidfor field" );
}
The field paidfor should not be present anymore.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list