Bugzilla – Attachment 129090 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.20 KB, created by
Martin Renvoize (ashimema)
on 2022-01-06 14:12:43 UTC
(
hide
)
Description:
Bug 21729: DB changes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-06 14:12:43 UTC
Size:
4.20 KB
patch
obsolete
>From 1ff9720dbd50d676d24bbacb9e0d9ffca6682a5a 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 > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../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 0000000000..d0315ab2db >--- /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 a309cea736..22b4756597 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3928,6 +3928,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)', >@@ -4337,7 +4338,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.20.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