MT 2146 :Adding index on issn
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 29 Oct 2009 15:41:50 +0000 (16:41 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 29 Oct 2009 15:41:50 +0000 (16:41 +0100)
updateversion incremented

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

index 3da9499..240804c 100755 (executable)
@@ -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
index 3cdcb66..1f4ee8b 100644 (file)
@@ -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