[Koha-patches] [PATCH 4/4] [SIGNED-OFF] Bug 5166: updatedatabase.pl fix

Julian Maurice julian.maurice at biblibre.com
Tue Mar 22 09:25:14 CET 2011


From: Tomas Cohen Arazi <tomascohen at gmail.com>


Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
---
 installer/data/mysql/updatedatabase.pl |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 6f589ed..6e7d336 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -4098,6 +4098,17 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo')");
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo')");
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo')");
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer')");
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer')");
+    print "Upgrade to $DBversion done (Add sysprefs to control zebraqueue_daemon scripts: ZebraUseXml, ZebraNoshadow, ZebraqueueVerboseLogging, ZebraBiblioUpdateRatio, ZebraAuthUpdateRatio)\n";
+    SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)
-- 
1.7.4.1



More information about the Koha-patches mailing list