r2949 - add index for "reservation comment" column, search uses it now
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 15 Jul 2009 20:34:22 +0000 (20:34 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 15 Jul 2009 20:34:22 +0000 (20:34 +0000)
install/init-structure.sql
upgrade.php

index e37e7d9a70e84df7d8964482c65f2f0912e83cce..2e23eb1745df18e381dffbe3e732207a2d61388a 100644 (file)
@@ -192,7 +192,8 @@ CREATE TABLE `Port` (
   PRIMARY KEY  (`id`),
   UNIQUE KEY `object_id` (`object_id`,`name`),
   UNIQUE KEY `l2address` (`l2address`),
-  KEY `type` (`type`)
+  KEY `type` (`type`),
+  KEY `comment` (`reservation_comment`)
 ) ENGINE=MyISAM;
 
 CREATE TABLE `PortCompat` (
index 2ec1510eb71d72c7931d7621ab90cae0d6348ece..f9f082b0071cd750cb4a2863974fe994544e9197 100644 (file)
@@ -238,6 +238,7 @@ CREATE TABLE `LDAPCache` (
                        // wipe irrelevant records (ticket:250)
                        $query[] = "DELETE FROM TagStorage WHERE entity_realm = 'file' AND entity_id NOT IN (SELECT id FROM File)";
                        $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4_ENABLE_KNIGHT','yes','string','no','no','Enable IPv4 knight feature')";
+                       $query[] = "ALTER TABLE Port ADD INDEX comment (reservation_comment)";
                        $query[] = "UPDATE Config SET varvalue = '0.17.2' WHERE varname = 'DB_VERSION'";
                        break;
                default: