https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36002
Katrin Fischer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #15 from Katrin Fischer <[email protected]> --- I have to admit that we have used this column in migrations to allow for reporting. And I feel we are not the only ones. Right now we just drop the column without checking for any contents. Could there be a more clever way of doing this, that raises a warning first? In light of us wanting to do more clean-up I think it would be worth to agree on how to handle this in general and then apply it to every removal moving forward. Maybe something like we did for items.paidfor? 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'|); } } Database update is missing the "success" say out line. Otherwise this does a good clean-up :) Didn't find any other references and amazed we missed removing GetParcels! -- You are receiving this mail because: 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/
