I suppose another option would be to still save the id from issues and reserves, but have them as a non-unique field, and have a separate unique id for the old_issues and old_reserves tables.
It wouldn't be useful for "undoing" things, because you could still have duplicate IDs in the non-unique field, but I suppose it would preserve your history best. The trigger idea from my other email might be the easiest way to do it, although triggers aren't all that nice to manage. Chris, what about deletedbiblio and deletedbiblioitem tables? The history there might be more important, as I think we're now including those in the OAI-PMH responses? I reckon those tables would be vulnerable to this as well, although perhaps less likely due to issues and reserves being more high frequency in terms of inserts/deletions. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595 > -----Original Message----- > From: koha-devel-boun...@lists.koha-community.org [mailto:koha-devel- > boun...@lists.koha-community.org] On Behalf Of Chris Cormack > Sent: Tuesday, 6 September 2016 6:56 AM > To: Mark Tompsett <mtomp...@hotmail.com> > Cc: Koha-devel <koha-devel@lists.koha-community.org> > Subject: Re: [Koha-devel] Serious problem > > * Mark Tompsett (mtomp...@hotmail.com) wrote: > > Greetings, > > > > And what if you wish to undo a checkout? > > There are advantages to having it. > > -- Perhaps we should ponder why we are uniquely keying on the id in > > old_issues? > > What? Undo an old check out? You mean like unreturn something? > There is no code to do that. If you want to unreturn something, you just > reissue it. > > It is just a history file, if it just auto_incremented the same way as issues > does then the whole problem goes away. > > I see no more advantage to having no issues_id, than to have one that auto > increments. > You'd still have to have a custom query either way if someone did decide to > write a bizarre piece of code that unreturned items. (Please no one do this, > it's a horrible idea) > > Chris > > > -- > Chris Cormack > Catalyst IT Ltd. > +64 4 803 2238 > PO Box 11-053, Manners St, Wellington 6142, New Zealand _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/