From cdcab6ba2883fa80a6cd165f17b2ff11d4c5a29a Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Thu, 29 Oct 2009 16:41:50 +0100 Subject: [PATCH] MT 2146 :Adding index on issn updateversion incremented --- installer/data/mysql/updatedatabase.pl | 12 +++++++++++- kohaversion.pl | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3da9499f3e..240804cdb9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3105,7 +3105,7 @@ $dbh->do(" $DBversion = "3.01.00.120"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - if (C4::Context->preference("opaclanguages") eq "fr") { + if (C4::Context->preference("opaclanguages") =~ /fr/) { $dbh->do(qq{ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','Si activé, des reservations sont automatiquement créées pour chaque lecteur de la liste de circulation d''un numéro de périodique','','YesNo'); }); @@ -3118,6 +3118,16 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES SetVersion ($DBversion); } +$DBversion = "3.01.00.121"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq{ + ALTER TABLE biblioitems ADD INDEX issn_idx (issn); + }); + print "Upgrade to $DBversion done (isbd updated)\n"; + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 3cdcb66a78..1f4ee8bd0d 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.120'; + our $VERSION = '3.01.00.121'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5