From 1ee67a5d19afc97db984c10c9152031a6cfdc69e Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Sat, 1 May 2010 00:19:51 +0200 Subject: [PATCH] Performance enhancing DBRev:132 Adding an index on language_descriptions table in order to boost searches Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ kohaversion.pl | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3d5c2fe3e6..cfa1ff3621 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3580,6 +3580,16 @@ INSERT IGNORE INTO message_transport_types (message_transport_type) VALUES ('pri SetVersion ($DBversion); } +$DBversion = "3.01.00.132"; +#3.02.00.023 +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) diff --git a/kohaversion.pl b/kohaversion.pl index 381bc45d35..386a15869f 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.131'; + our $VERSION = '3.01.00.132'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.20.1