Bugzilla – Attachment 195125 Details for
Bug 42068
Update on bug 26993 breaks items deletions with a corrupted foreign key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 42068: Update on bug 26993 breaks items deletions with a corrupted foreign key
63a2fde.patch (text/plain), 1.46 KB, created by
Kyle M Hall (khall)
on 2026-03-11 13:08:10 UTC
(
hide
)
Description:
Bug 42068: Update on bug 26993 breaks items deletions with a corrupted foreign key
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2026-03-11 13:08:10 UTC
Size:
1.46 KB
patch
obsolete
>From 63a2fde6c05e7259eb34d72df34f4254723dfa27 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 11 Mar 2026 09:02:42 -0400 >Subject: [PATCH] Bug 42068: Update on bug 26993 breaks items deletions with a > corrupted foreign key > >On bug 26993 we turned off foreign key checks to remove a unique constraint, then enabled them > >Test plan: >1) Run the db update for bug 42068 >2) Attempt to delete an item from Koha or via mysql >3) Note the error >4) Reset your database to pre 42068 >5) Apply this patch >6) Run the db update for bug 42068 >7) Note you can delete items again! >--- > installer/data/mysql/db_revs/251200013.pl | 3 --- > 1 file changed, 3 deletions(-) > >diff --git a/installer/data/mysql/db_revs/251200013.pl b/installer/data/mysql/db_revs/251200013.pl >index 409a1a07b19..7cf39d55aa9 100755 >--- a/installer/data/mysql/db_revs/251200013.pl >+++ b/installer/data/mysql/db_revs/251200013.pl >@@ -9,7 +9,6 @@ return { > my ( $dbh, $out ) = @$args{qw(dbh out)}; > > if ( index_exists( 'items_last_borrower', 'itemnumber' ) ) { >- $dbh->do('SET FOREIGN_KEY_CHECKS=0'); > > # Drop the unique index > $dbh->do( >@@ -17,8 +16,6 @@ return { > ALTER TABLE items_last_borrower DROP INDEX itemnumber > } > ); >- $dbh->do('SET FOREIGN_KEY_CHECKS=1'); >- > say_success( $out, "Adjusted foreign key constraints on items_last_borrower table" ); > } > >-- >2.50.1 (Apple Git-155) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 42068
:
195123
|
195125
|
195132
|
195136