Bugzilla – Attachment 76939 Details for
Bug 20773
bug 20724 follow-up - Database cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20773: (followup) Remove MySQLism
Bug-20773-followup-Remove-MySQLism.patch (text/plain), 1.40 KB, created by
Martin Renvoize (ashimema)
on 2018-07-13 09:50:13 UTC
(
hide
)
Description:
Bug 20773: (followup) Remove MySQLism
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-07-13 09:50:13 UTC
Size:
1.40 KB
patch
obsolete
>From 1ed5ca50e2a6c3b5dc390490368ec1d23fc5626c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 13 Jul 2018 10:49:10 +0100 >Subject: [PATCH] Bug 20773: (followup) Remove MySQLism > >--- > installer/data/mysql/atomicupdate/bug_20724.perl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_20724.perl b/installer/data/mysql/atomicupdate/bug_20724.perl >index ffdb1dc73c..d93d30433f 100644 >--- a/installer/data/mysql/atomicupdate/bug_20724.perl >+++ b/installer/data/mysql/atomicupdate/bug_20724.perl >@@ -1,7 +1,10 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- my $sql = q|UPDATE reserves SET expirationdate = DATE_ADD( NOW(), INTERVAL ? DAY) WHERE expirationdate IS NULL AND waitingdate IS NOT NULL|; >- $dbh->do( $sql, undef, C4::Context->preference('MaxPickupDelay') || 7 ); >+ my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ my $days = C4::Context->preference('MaxPickupDelay') || 7; >+ my $date = DateTime->now()->add( days => $days ); >+ my $sql = q|UPDATE reserves SET expirationdate = ? WHERE expirationdate IS NULL AND waitingdate IS NOT NULL|; >+ $dbh->do( $sql, undef, $dtf->format_datetime($date) ); > > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 20724 - expirationdate filled for waiting holds)\n"; >-- >2.17.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 20773
:
75368
|
76939
|
77778
|
77779
|
77780
|
78036
|
78038