Bugzilla – Attachment 193504 Details for
Bug 28528
bulkmarcimport delete option doesn't delete biblio_metadata
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28528: bulkmarcimport delete option doesn't delete biblio_metadata
Bug-28528-bulkmarcimport-delete-option-doesnt-dele.patch (text/plain), 2.33 KB, created by
Marcel de Rooy
on 2026-02-20 09:00:41 UTC
(
hide
)
Description:
Bug 28528: bulkmarcimport delete option doesn't delete biblio_metadata
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2026-02-20 09:00:41 UTC
Size:
2.33 KB
patch
obsolete
>From 9953f62ae279948b6254659f8368ad07e848f462 Mon Sep 17 00:00:00 2001 >From: Roman Dolny <roman.dolny@jezuici.pl> >Date: Mon, 20 Jan 2025 19:18:37 +0000 >Subject: [PATCH] Bug 28528: bulkmarcimport delete option doesn't delete > biblio_metadata >Content-Type: text/plain; charset=utf-8 > >When using bulkmarcimport with the -d switch should not only delete >biblio, biblioitems and items, but also biblio_metadata. > >I haven't checked if a FK takes care of the data, but if it does, >we should still also reset the AUTO_INCREMENT:... > >Test plan: >========== >1. Check (and notice) the number of records in the biblio (bCount) and > biblio_metadata (bmCount) tables. Check the AUTO_INCREMENT value > for these tables (bAI, bmAI). >2. Import bibliographic records with delete, turn off foreign key checks > and non-existent filename: > misc/migration_tools/bulkmarcimport.pl -b -d -fk -file=non-exist-file >==> "Could not open..." is OK, file doesn't exist. >3. Repeat p. 1 and compare with previously noticed: > bCount => 0 (OK) > bmCount => unchanged (NOT OK) > bAI => 1 (OK) > bmAI => unchanged (NOT OK) >4. Apply the patch. >5. Repeat p. 2-3: > bCount => 0 (OK) > bmCount => 0 (changed, OK) > bAI => 1 (OK) > bmAI => 1 (changed, OK) > >Sponsored-by: Ignatianum University in Cracow >Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/migration_tools/bulkmarcimport.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 147aa57118..11104c1f7c 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -234,6 +234,8 @@ if ($delete) { > $dbh->do("ALTER TABLE biblioitems AUTO_INCREMENT = 1"); > $dbh->do("DELETE FROM items"); > $dbh->do("ALTER TABLE items AUTO_INCREMENT = 1"); >+ $dbh->do("DELETE FROM biblio_metadata"); >+ $dbh->do("ALTER TABLE biblio_metadata AUTO_INCREMENT = 1"); > } else { > print "Deleting authorities\n"; > $dbh->do("DELETE FROM auth_header"); >@@ -949,7 +951,7 @@ I<UNIMARC> are supported. MARC21 by default. > =item B<-d, --delete> > > Delete EVERYTHING related to biblio in koha-DB before import. Tables: biblio, >-biblioitems, items >+biblioitems, items, biblio_metadata > > =item B<-m>=I<FORMAT> > >-- >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 28528
:
176844
|
180606
| 193504 |
193505