https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18242
--- Comment #3 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> --- Created attachment 60971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60971&action=edit Bug 18242: [SOLUTION 1]Remove primary key on old_issues.issue_id The table old_issues has a primary key defined on the issue_id column. This issue_id comes from the issues table when an item is checked in. In some case the value of issue_id already exists in the table Basically this happens when an item is returned and mysqld is restarted: The auto increment value for issues.issue_id will be reset to MAX(issue_id)+1 (which is the value of the last entry of old_issues). See also the description of bug 18003 for more informations. The easier solution seems to add a new column id as a primary key. The changes to the codebase are very small. However this will raise few problems: - We can no longer assume that accountlines.issue_id==old_issues.id (I guess it is problematic). - Code in Koha::REST::V1::_object_ownership_by_checkout_id is wrong assuming that old_issues.issuing_id is unique -- 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/