[Koha] Salvaging data before using DBMS auto increment fix

Pedro Amorim pjamorim91 at gmail.com
Tue Oct 24 01:13:26 NZDT 2017


Hello all,

I want to implement
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix on our
instance, however from my understanding this will only prevent the problem
from happening in the future, it will not fix the current corrupted data.

I happen to have 19 ids that exist on both issues and old_issues and would
like to the clean-up before going further. However, I'm not sure how to
proceed:

1) Remove the 19 ids from the *issues* table and implement the fix.
Downside is the data of those 19 issues would be lost and it would be as if
those check-outs never happened;

2) Remove the 19 ids from the *old_issues* table and implement the fix.
Data is lost, would be as if the item was never checked out and then
checked in again but, in theory, this would open room for the 19 ids in the
issues when they check-in.

3) Update the 19 ids in the *issues* table to the next 19 ID's available,
move the AI value 19 upwards and check if it's +1 than the current
max(issue_id). This is, in theory, the best way as no data is lost, those
19 ID's in *issues* table would have their ID's available in the old_issues
table, and the fix prevents the problem from happening in the future.
However this sounds the most risky way to go about it.

Would anyone give me advice or their opinion on this? Am I looking at this
the right way or is there some other better way to work around it?

Thanks a bunch,

Pedro Amorim


More information about the Koha mailing list