http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7493
--- Comment #1 from Owen Leonard <oleon...@myacpl.org> 2012-02-06 15:06:45 UTC --- I think the solution to this problem is to add a foreign key constraint so that when bibliographic or patron records are deleted the reviews table is updated. I propose to: - delete reviews when bibliographic records are deleted - set set reviews.borrowernumber to NULL when patron records are deleted. The database update making these changes will not run properly if there are already instances of this bug--reviews with deleted biblios or patrons--so some kind of update will have to be run in addition to setting the constraint. Does anyone have any comments or suggestions about the efficiency/efficacy of using these queries for that purpose? DELETE FROM reviews WHERE biblionumber IN (SELECT biblionumber from deletedbiblio); UPDATE reviews SET borrowernumber = NULL WHERE borrowernumber IN (SELECT borrowernumber FROM deletedborrowers); -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/