[sr-dev] git:master: modules/lcr/utils/lcr_upgrade_from_3.1.sh: upgraded also lcr_gw index.

Juha Heinanen jh at tutpro.com
Thu Oct 6 20:26:24 CEST 2011


Module: sip-router
Branch: master
Commit: 20599670ead5e94f9b3716eaf6e05324eb99b39d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=20599670ead5e94f9b3716eaf6e05324eb99b39d

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date:   Thu Oct  6 21:25:38 2011 +0300

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

---

 modules/lcr/utils/lcr_upgrade_from_3.1.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/lcr/utils/lcr_upgrade_from_3.1.sh b/modules/lcr/utils/lcr_upgrade_from_3.1.sh
index 3db7022..b8d30ee 100644
--- a/modules/lcr/utils/lcr_upgrade_from_3.1.sh
+++ b/modules/lcr/utils/lcr_upgrade_from_3.1.sh
@@ -45,9 +45,12 @@ function upgrade_lcr_gw_table() {
     or die("Failed to alter 'ser/lcr_gw' table!\n");
   mysql_query("ALTER TABLE lcr_gw ADD COLUMN tag VARCHAR(64) DEFAULT NULL AFTER prefix")
     or die("Failed to alter 'ser/lcr_gw' table!\n");
+  mysql_query("ALTER TABLE lcr_gw DROP INDEX lcr_id_ip_addr_port_hostname_idx")
+    or die ("Failed to drop 'ser/lcr_gw' index\n");
+  mysql_query("ALTER TABLE lcr_gw ADD INDEX lcr_id_idx (lcr_id)")
+    or die ("Failed to add 'ser/lcr_gw' index\n");
   mysql_query("UPDATE version SET table_version=2 WHERE table_name='lcr_gw'")
     or die ("Failed to update into 'ser/version' table\n");
-
   db_disconnect();
 
   echo "Table 'ser/lcr_gw' upgraded\n";




More information about the sr-dev mailing list