Bugzilla – Attachment 142767 Details for
Bug 31948
Add timestamp to tmp_holdsqueue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31948: Add timestamp to tmp_holdsqueue table
Bug-31948-Add-timestamp-to-tmpholdsqueue-table.patch (text/plain), 2.46 KB, created by
Katrin Fischer
on 2022-10-28 14:06:09 UTC
(
hide
)
Description:
Bug 31948: Add timestamp to tmp_holdsqueue table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-10-28 14:06:09 UTC
Size:
2.46 KB
patch
obsolete
>From 0ce1c973762a6e8083ca8cab5d1a6f578cb0a11f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 28 Oct 2022 13:56:10 +0000 >Subject: [PATCH] Bug 31948: Add timestamp to tmp_holdsqueue table > >With the option to have real time updates to tmp_holdsqueue >a timestamp will be really helpful to help find the most recently >added entries. > >To test: >* Place some holds on a record with available items >* Run build_holds-queue.pl >* Verify the hold shows up under circulation > holds queue >* Apply patch >* Run build_holds_queue.pl again >* Verify this works without any issues >* Turn on RealTimeHoldsQueue >* Update pick-up location, add another hold >* Make sure these changes are reflected in the holds queue as well >* Look at the database and verify timestamps are set >--- > .../mysql/atomicupdate/bug_31948_tmp_holdsqueue.pl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 14 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_31948_tmp_holdsqueue.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_31948_tmp_holdsqueue.pl b/installer/data/mysql/atomicupdate/bug_31948_tmp_holdsqueue.pl >new file mode 100755 >index 0000000000..c5fbd8d546 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_31948_tmp_holdsqueue.pl >@@ -0,0 +1,13 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "31948", >+ description => "Add timestamp to tmp_holdsqueue table", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request}); >+ say $out ""; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 58f8102461..e88c75f5d4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5382,6 +5382,7 @@ CREATE TABLE `tmp_holdsqueue` ( > `pickbranch` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `notes` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `item_level_request` tinyint(4) NOT NULL DEFAULT 0, >+ `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date and time this entry as added/last updated', > KEY `tmp_holdsqueue_ibfk_1` (`itemnumber`), > KEY `tmp_holdsqueue_ibfk_2` (`biblionumber`), > KEY `tmp_holdsqueue_ibfk_3` (`borrowernumber`), >-- >2.30.2
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 31948
:
142767
|
142773
|
142774