https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33800
--- Comment #5 from Marcel de Rooy <[email protected]> --- 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. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
