Browse code

modules/lcr/utils/lcr_upgrade_from_3.1.sh: upgraded also lcr_gw index.

Juha Heinanen authored on 06/10/2011 18:25:38
Showing 1 changed files
... ...
@@ -45,9 +45,12 @@ function upgrade_lcr_gw_table() {
45 45
     or die("Failed to alter 'ser/lcr_gw' table!\n");
46 46
   mysql_query("ALTER TABLE lcr_gw ADD COLUMN tag VARCHAR(64) DEFAULT NULL AFTER prefix")
47 47
     or die("Failed to alter 'ser/lcr_gw' table!\n");
48
+  mysql_query("ALTER TABLE lcr_gw DROP INDEX lcr_id_ip_addr_port_hostname_idx")
49
+    or die ("Failed to drop 'ser/lcr_gw' index\n");
50
+  mysql_query("ALTER TABLE lcr_gw ADD INDEX lcr_id_idx (lcr_id)")
51
+    or die ("Failed to add 'ser/lcr_gw' index\n");
48 52
   mysql_query("UPDATE version SET table_version=2 WHERE table_name='lcr_gw'")
49 53
     or die ("Failed to update into 'ser/version' table\n");
50
-
51 54
   db_disconnect();
52 55
 
53 56
   echo "Table 'ser/lcr_gw' upgraded\n";