From 0b40f80e4a3fbacf817b622bbcea4d2009610bae Mon Sep 17 00:00:00 2001 From: Jon Langseth Date: Wed, 18 Jan 2012 15:48:23 +0100 Subject: [PATCH 1/1] adding provision URL as part of server-data in SQL --- api/lib/common_functions.php | 2 +- doc/sql-data/sample-data.sql | 2 +- doc/sql-data/structure.sql | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/lib/common_functions.php b/api/lib/common_functions.php index 52d99e8..df76b57 100644 --- a/api/lib/common_functions.php +++ b/api/lib/common_functions.php @@ -22,7 +22,7 @@ function is_kamailio_domain ( $domain ) function get_servers( $domain ) { global $config; - $query = sprintf("SELECT registrar, r_port, proxy, p_port FROM %s WHERE domain = '%s'", + $query = sprintf("SELECT registrar, r_port, proxy, p_port, prov_url FROM %s WHERE domain = '%s'", $config['provision_servers_table'], sql_clean( $domain )); $servers = sql_dbquery_single( $config['provision_db'], $query ); diff --git a/doc/sql-data/sample-data.sql b/doc/sql-data/sample-data.sql index 9c5c0ed..4c744c7 100644 --- a/doc/sql-data/sample-data.sql +++ b/doc/sql-data/sample-data.sql @@ -471,7 +471,7 @@ UNLOCK TABLES; LOCK TABLES `servers` WRITE; /*!40000 ALTER TABLE `servers` DISABLE KEYS */; -INSERT INTO `servers` VALUES (1,'example.com','example.com',5062,'pbx.example.com',5060); +INSERT INTO `servers` VALUES (1,'example.com','example.com',5062,'pbx.example.com',5060,NULL); /*!40000 ALTER TABLE `servers` ENABLE KEYS */; UNLOCK TABLES; diff --git a/doc/sql-data/structure.sql b/doc/sql-data/structure.sql index aa05a75..eaf4260 100644 --- a/doc/sql-data/structure.sql +++ b/doc/sql-data/structure.sql @@ -1069,10 +1069,13 @@ CREATE TABLE `servers` ( `r_port` int(11) default NULL, `proxy` varchar(255) character set utf8 default NULL, `p_port` int(11) default NULL, - PRIMARY KEY (`id`) + `prov_url` text, + PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; + + -- -- Table structure for table `users` -- -- 2.39.2