Bugzilla – Attachment 172687 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), 3.98 KB, created by
Nick Clemens (kidclamp)
on 2024-10-11 13:13:30 UTC
(
hide
)
Description:
Bug 30648: Add deleted_biblionumber column for reserves
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-10-11 13:13:30 UTC
Size:
3.98 KB
patch
obsolete
>From b65e29c8cdf7bf81e2267299844d76afab5ebccd 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 > >--- > .../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 00000000000..32f7b586bba >--- /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 31f0828a24e..fe2a722ce6f 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4921,6 +4921,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', >@@ -5490,6 +5491,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