Bug 7751 follow-up adding updatedatabase for sysprefs decreateLoanHighHolds*
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 19 Sep 2012 10:01:11 +0000 (12:01 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 19 Sep 2012 10:01:11 +0000 (12:01 +0200)
See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7751#c31 to c34

installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 8f0efc8..f28995e 100755 (executable)
@@ -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
 
index c796607..1b810c3 100644 (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