Bug 8585 : Add System Preference to specify Holds to Pull List Start Date
[koha.git] / installer / data / mysql / updatedatabase.pl
index b8b4047..63b8803 100755 (executable)
@@ -5988,6 +5988,20 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion ="3.09.00.059";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');");
+    print "Upgrade to $DBversion done (Add system preference BlockReturnOfWithdrawnItems)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer')");
+    print "Upgrade to $DBversion done (Added HoldsToPullStartDate syspref)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)