Module: sip-router
Branch: master
Commit: 2d14c2a6cf212743b49ed07e76241ea5d3186c55
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2d14c2a…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sun Jul 5 10:55:48 2009 +0300
scripts/mysql: updated 'gw' and 'lcr' table definitions
- Updated 'gw' and 'lcr' MySQL table definitions.
- No idea if a schema exists somewhere where sr tables are
auto-generated.
- The tables are assumed to have versions 10 and 3, respectively
although there is no 'version' table in sr database.
---
scripts/mysql/my_create.sql | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/scripts/mysql/my_create.sql b/scripts/mysql/my_create.sql
index 45f38e7..fc27798 100644
--- a/scripts/mysql/my_create.sql
+++ b/scripts/mysql/my_create.sql
@@ -204,31 +204,31 @@ CREATE TABLE phonebook (
);
CREATE TABLE gw (
+ id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT UNSIGNED NOT NULL DEFAULT 1,
gw_name VARCHAR(128) NOT NULL,
- ip_addr INT UNSIGNED NOT NULL,
+ grp_id INT UNSIGNED NOT NULL,
+ ip_addr VARCHAR(15) NOT NULL,
+ hostname VARCHAR(64),
port SMALLINT UNSIGNED,
uri_scheme TINYINT UNSIGNED,
- transport SMALLINT UNSIGNED,
- prefix VARCHAR(16) NOT NULL,
- grp_id INT NOT NULL,
- UNIQUE KEY gw_idx1 (gw_name),
- KEY gw_idx2 (grp_id)
-);
-
-CREATE TABLE gw_grp (
- grp_id INT AUTO_INCREMENT NOT NULL,
- grp_name VARCHAR(64) NOT NULL,
- UNIQUE KEY gwgrp_idx (grp_id)
+ transport TINYINT UNSIGNED,
+ strip TINYINT UNSIGNED,
+ tag VARCHAR(16) DEFAULT NULL,
+ weight INT UNSIGNED,
+ flags INT UNSIGNED DEFAULT 0 NOT NULL,
+ defunct INT UNSIGNED DEFAULT NULL,
+ CONSTRAINT lcr_id_gw_name_idx UNIQUE (lcr_id, gw_name)
);
CREATE TABLE lcr (
- prefix VARCHAR(16) NOT NULL,
- from_uri VARCHAR(255) NOT NULL DEFAULT '%',
- grp_id INT,
- priority INT,
- KEY lcr_idx1 (prefix),
- KEY lcr_idx2 (from_uri),
- KEY lcr_idx3 (grp_id)
+ id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ lcr_id SMALLINT UNSIGNED NOT NULL DEFAULT 1,
+ prefix VARCHAR(16) DEFAULT NULL,
+ from_uri VARCHAR(64) DEFAULT NULL,
+ grp_id INT UNSIGNED NOT NULL,
+ priority TINYINT UNSIGNED NOT NULL,
+ INDEX lcr_id_idx (lcr_id)
);
CREATE TABLE grp (