Bug 20773: DBRev 18.05.02.003

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7dab4cd903)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2018-08-21 11:25:53 +00:00 committed by Martin Renvoize
parent 6eb334e244
commit 31bf49b849
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
3 changed files with 12 additions and 12 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "18.05.02.002";
$VERSION = "18.05.02.003";
sub version {
return $VERSION;

View File

@ -1,11 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
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";
}

View File

@ -16114,6 +16114,17 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 21226 - Remove prefs OCLCAffiliateID, XISBN and XISBNDailyLimit)\n";
}
$DBversion = '18.05.02.003';
if( CheckVersion( $DBversion ) ) {
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 20773 - expirationdate filled for waiting holds)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.