[Koha] Another DBI Exception for foreign key constraint in upgrade to Koha

Pablo Bianchi pablo.bianchi at gmail.com
Sun Dec 4 18:46:28 NZDT 2022


Thank you all for the answers!

On Sat, 3 Dec 2022 at 18:59, Katrin Fischer <katrin.fischer.83 at web.de>
wrote:

> Do you have entries in your issues table, where the borrowernumber is
> NULL?
>

Nope. In fact, *issues* has only one row, with its integer on
borrowernumber:
issue_id: 2. *borrowernumber: 53805*. issuer_id: NULL. *itemnumber: 1581.*
date_due: 2020-10-08 23:59:00. branchcode: BC. returndate: NULL.
lastreneweddate: NULL. renewals: 0. unseen_renewals: 0. auto_renew: 0.
auto_renew_error: NULL. timestamp: 2020-10-07 15:29:52. issuedate:
2020-10-07 15:29:52. onsite_checkout: 0. note: NULL. notedate: NULL.
noteseen: NULL.
On Sun, 4 Dec 2022 at 01:00, Tomas Cohen Arazi <tomascohen at gmail.com> wrote:

> That's a data issue. Maybe an old bug let things in wrongly on the db, it
> incomplete data migration.
>
> You should do something with those checkouts with no linked patron, and
> the upgrade script will continue where it left.
>

borrowernumber (and itemnumber) are not NULL in the only row of issues
table. Also, the borrowernumber (53805) exists on borrowers table. Could be
something else?

As a last resource (I wish to avoid) I could DELETE the row. This will
always cascade any action and can't break any consistency?

JFTR, even of course upgrading to Debian 10 has nothing to do with this, I
had some trouble with Apache and Memcached and new security features of
systemd (like PrivateTmp). I had to disable them.


More information about the Koha mailing list