Bugzilla – Attachment 187852 Details for
Bug 41008
bulkmarcimport.pl -d broken for authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41008: Fix bulkmarimport.pl -a -d
Bug-41008-Fix-bulkmarimportpl--a--d.patch (text/plain), 1.40 KB, created by
Katrin Fischer
on 2025-10-14 08:21:22 UTC
(
hide
)
Description:
Bug 41008: Fix bulkmarimport.pl -a -d
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2025-10-14 08:21:22 UTC
Size:
1.40 KB
patch
obsolete
>From 5de9f68ce241e04eb506503f71bb97b56ead8697 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Tue, 14 Oct 2025 10:10:08 +0200 >Subject: [PATCH] Bug 41008: Fix bulkmarimport.pl -a -d > >After bug 35659 that added the OAI harvester to Koha the -d switch >for deleting authorities before importing with bulkmarcimport.pl >was broken and resulted in a FK error. > >Switching from truncate to DELETE FROM like we already did for items, >biblio etc. fixes the issue. > >To test: >- Make sure you have some authorities in your database >- Export some into a file for importing >- Run bulkmarcimport -a -d --file <filename> >- Verify you get the a DB FK constraint error. >- Apply patch >- Repeat steps, verify the script now works as expected again > * Existing authorities are deleted > * File is imported >--- > misc/migration_tools/bulkmarcimport.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index cd5fa255a6e..147aa57118c 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -236,7 +236,7 @@ if ($delete) { > $dbh->do("ALTER TABLE items AUTO_INCREMENT = 1"); > } else { > print "Deleting authorities\n"; >- $dbh->do("truncate auth_header"); >+ $dbh->do("DELETE FROM auth_header"); > } > $dbh->do("truncate zebraqueue"); > } >-- >2.39.5
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 41008
: 187852