Bugzilla – Attachment 126160 Details for
Bug 21729
When reverting a hold the expirationdate should be reset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21729: DB changes
Bug-21729-DB-changes.patch (text/plain), 4.01 KB, created by
Jonathan Druart
on 2021-10-13 09:38:04 UTC
(
hide
)
Description:
Bug 21729: DB changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-13 09:38:04 UTC
Size:
4.01 KB
patch
obsolete
>From e12e5aa49ebf3aaf66cd8e2a8c575c9c581c8a57 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 13 Oct 2021 11:02:24 +0200 >Subject: [PATCH] Bug 21729: DB changes > >--- > .../data/mysql/atomicupdate/bug_21729.pl | 25 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++- > 2 files changed, 28 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_21729.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_21729.pl b/installer/data/mysql/atomicupdate/bug_21729.pl >new file mode 100755 >index 00000000000..d0315ab2db7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21729.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "21729", >+ description => "Add new column reserves.patron_expiration_date", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ unless( column_exists('reserves', 'patron_expiration_date') ) { >+ $dbh->do(q{ >+ ALTER TABLE reserves >+ ADD COlUMN patron_expiration_date date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date' >+ AFTER expirationdate >+ }); >+ } >+ unless( column_exists('old_reserves', 'patron_expiration_date') ) { >+ $dbh->do(q{ >+ ALTER TABLE old_reserves >+ ADD COlUMN patron_expiration_date date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date' >+ AFTER expirationdate >+ }); >+ } >+ >+ }, >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 95a3735906c..c61e59ba8fe 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3875,6 +3875,7 @@ CREATE TABLE `old_reserves` ( > `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with', > `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', > `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)', >+ `patron_expiration_date` date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date', > `lowestPriority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)', > `suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)', > `suspend_until` datetime DEFAULT NULL COMMENT 'the date this hold is suspended until (NULL for infinitely)', >@@ -4317,7 +4318,8 @@ CREATE TABLE `reserves` ( > `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', > `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with', > `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', >- `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)', >+ `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (calculated value)', >+ `patron_expiration_date` date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date', > `lowestPriority` tinyint(1) NOT NULL DEFAULT 0, > `suspend` tinyint(1) NOT NULL DEFAULT 0, > `suspend_until` datetime DEFAULT NULL, >-- >2.25.1
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 21729
:
126160
|
126161
|
126162
|
126203
|
126258
|
127797
|
127798
|
127799
|
127800
|
127867
|
127868
|
127869
|
127870
|
127877
|
127878
|
127879
|
127880
|
128761
|
129090
|
129091
|
129092
|
129093
|
129094