Bug 42067 - Items can no longer be deleted after running the bug 26993 database update
Summary: Items can no longer be deleted after running the bug 26993 database update
Status: RESOLVED DUPLICATE of bug 42068
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-11 12:26 UTC by Kyle M Hall (khall)
Modified: 2026-03-11 12:40 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2026-03-11 12:26:00 UTC
Caused by bug 26993. 

I think this is because the db rev drops the UNIQUE KEY itemnumber from items_last_borrower using SET FOREIGN_KEY_CHECKS=0 to bypass MySQL's protection against dropping an index that backs a FK constraint. This leaves items_last_borrower_ibfk_1 intact in metadata but without a supporting index, causing all item deletions to fail with error 1451 even if items_last_borrower is empty.
Comment 1 Kyle M Hall (khall) 2026-03-11 12:40:31 UTC

*** This bug has been marked as a duplicate of bug 42068 ***