Bugzilla – Attachment 77780 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.45 KB, created by
Victor Grousset/tuxayo
on 2018-08-14 10:12:02 UTC
(
hide
)
Description:
Bug 20773: (followup) Remove MySQLism
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2018-08-14 10:12:02 UTC
Size:
1.45 KB
patch
obsolete
>From f2a9b1e6832f0c2f41b7a80e69b97a73801a71da 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 > >Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> >--- > 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 ffdb1dc..d93d304 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.7.4
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