Bug 7751 follow-up adding updatedatabase for sysprefs decreateLoanHighHolds*

See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7751#c31 to c34
This commit is contained in:
Paul Poulain 2012-09-19 12:01:11 +02:00
parent 659a4aab57
commit 7aff89ebff
2 changed files with 10 additions and 1 deletions

View File

@ -5918,6 +5918,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.09.00.052";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHolds', NULL, '', 'Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue', 'YesNo');");
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHoldsValue', NULL, '', 'Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)', 'Integer');");
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHoldsDuration', NULL, '', 'Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds', 'Integer');");
print "Upgrade to $DBversion done (Add systempreferences to decrease loan length on high demand items decreaseLoanHighHolds, decreaseLoanHighHoldsValue and decreaseLoanHighHoldsDuration) \n";
SetVersion ($DBversion);
}
=head1 FUNCTIONS

View File

@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
our $VERSION = '3.09.00.051';
our $VERSION = '3.09.00.052';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install