[Koha-patches] [PATCH] Performance enhancing DBRev:01.00.129 and 128

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Apr 7 15:01:24 CEST 2010


Adding an index on language_descriptions table in order to boost searches

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

128 reintroduce a value in systempreference choices
---
 installer/data/mysql/updatedatabase.pl |   21 +++++++++++++++++++++
 kohaversion.pl                         |    2 +-
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index e21b37c..1509115 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3548,6 +3548,27 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){
     SetVersion ($DBversion);
 }
 
+
+$DBversion = "3.01.00.128";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+	$dbh->do("UPDATE systempreferences SET options = 'Calendar|Days|Datedue' WHERE variable = 'useDaysMode'");
+	
+    print "Upgrade to $DBversion done (upgrade useDaysMode syspref)\n";
+    SetVersion ($DBversion);
+}
+
+
+
+$DBversion = "3.01.00.129";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+	$dbh->do(q{
+    ALTER TABLE language_descriptions ADD INDEX LANG (subtag, type, lang);
+    });
+    print "Upgrade to $DBversion done (Adding index to language_descriptions table)\n";
+    SetVersion ($DBversion);
+}
+
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
diff --git a/kohaversion.pl b/kohaversion.pl
index 50f5ef4..884c0e2 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.01.00.127';
+    our $VERSION = '3.01.00.129';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
-- 
1.6.3.3




More information about the Koha-patches mailing list