Bugzilla – Attachment 173340 Details for
Bug 30648
Title is lost in holds history when bibliographic record is deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30648: Add deleted_biblionumber column for reserves
Bug-30648-Add-deletedbiblionumber-column-for-reser.patch (text/plain), 4.13 KB, created by
Biblibre Sandboxes
on 2024-10-25 10:54:59 UTC
(
hide
)
Description:
Bug 30648: Add deleted_biblionumber column for reserves
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2024-10-25 10:54:59 UTC
Size:
4.13 KB
patch
obsolete
>From 506f4d8cc94bb702268b7815e69f5ff53ba6e6b5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Oct 2024 12:05:11 +0000 >Subject: [PATCH] Bug 30648: Add deleted_biblionumber column for reserves >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Anneli Ãsterman <anneli.osterman@koha-suomi.fi> >--- > .../data/mysql/atomicupdate/bug_30648.pl | 31 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 33 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30648.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30648.pl b/installer/data/mysql/atomicupdate/bug_30648.pl >new file mode 100755 >index 0000000000..32f7b586bb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30648.pl >@@ -0,0 +1,31 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "30648", >+ description => "Store biblionumber of deleted record in old reserves", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ if ( !column_exists( 'reserves', 'deleted_biblionumber' ) ) { >+ >+ $dbh->do( >+ q{ >+ ALTER TABLE `reserves` >+ ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber >+ } >+ ); >+ } >+ say $out "Added column 'reserves.deleted_biblionumber'"; >+ if ( !column_exists( 'old_reserves', 'deleted_biblionumber' ) ) { >+ >+ $dbh->do( >+ q{ >+ ALTER TABLE `old_reserves` >+ ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber >+ } >+ ); >+ } >+ say $out "Added column 'old_reserves.deleted_biblionumber'"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 74c97bfa5d..e274b6d876 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4922,6 +4922,7 @@ CREATE TABLE `old_reserves` ( > `borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', > `reservedate` date DEFAULT NULL COMMENT 'the date the hold was places', > `biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', >+ `deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)', > `item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', > `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', >@@ -5491,6 +5492,7 @@ CREATE TABLE `reserves` ( > `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for', > `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed', > `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on', >+ `deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)', > `item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) NOT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', > `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', >-- >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 30648
:
172687
|
172688
|
172689
|
172690
|
172691
|
172692
|
173340
|
173341
|
173342
|
173343
|
173344
|
173345
|
173491
|
173492
|
173493
|
173494
|
173495
|
173496
|
173611