Browse Source

- updated from latest schema description

Jan Janak 20 years ago
parent
commit
ab384540f3

+ 1 - 1
scripts/dbtext/ser_db/missed_calls

@@ -1 +1 @@
-id(int,auto) from_uid(str,null) to_uid(str,null) to_did(str,null) from_did(str,null) sip_from(str,null) sip_to(str,null) sip_status(str,null) sip_method(str,null) inbound_ruri(str,null) outbound_ruri(str,null) from_uri(str,null) to_uri(str,null) sip_callid(str,null) sip_cseq(int,null) digest_username(str,null) digest_realm(str,null) from_tag(str,null) to_tag(str,null) request_timestamp(int) response_timestamp(int) flags(int) attrs(str,null) 
+id(int,auto) from_uid(str,null) to_uid(str,null) to_did(str,null) from_did(str,null) sip_from(str,null) sip_to(str,null) sip_status(str,null) sip_method(str,null) in_ruri(str,null) out_ruri(str,null) from_uri(str,null) to_uri(str,null) sip_callid(str,null) sip_cseq(int,null) digest_username(str,null) digest_realm(str,null) from_tag(str,null) to_tag(str,null) src_ip(int,null) src_port(int,null) request_timestamp(int) response_timestamp(int) flags(int) attrs(str,null) 

+ 1 - 0
scripts/dbtext/ser_db/presentity_notes

@@ -0,0 +1 @@
+dbid(str) presid(int) etag(str) note(str) lang(str) expires(int) 

+ 7 - 5
scripts/mysql/my_create.sql

@@ -72,8 +72,8 @@ CREATE TABLE missed_calls (
     sip_to VARCHAR(255),
     sip_status VARCHAR(128),
     sip_method VARCHAR(16),
-    inbound_ruri VARCHAR(255),
-    outbound_ruri VARCHAR(255),
+    in_ruri VARCHAR(255),
+    out_ruri VARCHAR(255),
     from_uri VARCHAR(255),
     to_uri VARCHAR(255),
     sip_callid VARCHAR(255),
@@ -82,6 +82,8 @@ CREATE TABLE missed_calls (
     digest_realm VARCHAR(255),
     from_tag VARCHAR(128),
     to_tag VARCHAR(128),
+    src_ip INT UNSIGNED,
+    src_port SMALLINT UNSIGNED,
     request_timestamp DATETIME NOT NULL,
     response_timestamp DATETIME NOT NULL,
     flags INT UNSIGNED NOT NULL DEFAULT '0',
@@ -151,7 +153,7 @@ CREATE TABLE domain (
     domain VARCHAR(128) NOT NULL,
     last_modified timestamp NOT NULL,
     flags INT UNSIGNED NOT NULL DEFAULT '0',
-    UNIQUE KEY domain_idx (did, domain)
+    UNIQUE KEY domain_idx (domain)
 );
 
 CREATE TABLE location (
@@ -264,8 +266,8 @@ CREATE TABLE uri (
     did VARCHAR(64) NOT NULL,
     username VARCHAR(64) NOT NULL,
     flags INT UNSIGNED NOT NULL DEFAULT '0',
-    UNIQUE KEY uri_idx1 (username, did, flags),
-    UNIQUE KEY uri_uid (uid, flags)
+    KEY uri_idx1 (username, did),
+    KEY uri_uid (uid)
 );
 
 CREATE TABLE speed_dial (

+ 6 - 6
scripts/oracle/or_create.sql

@@ -69,8 +69,8 @@ CREATE TABLE missed_calls (
     sip_to string(255),
     sip_status string(128),
     sip_method string(16),
-    inbound_ruri string(255),
-    outbound_ruri string(255),
+    in_ruri string(255),
+    out_ruri string(255),
     from_uri string(255),
     to_uri string(255),
     sip_callid string(255),
@@ -79,6 +79,8 @@ CREATE TABLE missed_calls (
     digest_realm string(255),
     from_tag string(128),
     to_tag string(128),
+    src_ip int,
+    src_port short,
     request_timestamp datetime NOT NULL,
     response_timestamp datetime NOT NULL,
     flags int NOT NULL DEFAULT '0',
@@ -145,7 +147,7 @@ CREATE TABLE domain (
     domain string(128) NOT NULL,
     last_modified datetime NOT NULL,
     flags int NOT NULL DEFAULT '0',
-    domain_idx UNIQUE (did, domain, )
+    domain_idx UNIQUE (domain, )
 );
 
 CREATE TABLE location (
@@ -251,9 +253,7 @@ CREATE TABLE uri (
     uid string(64) NOT NULL,
     did string(64) NOT NULL,
     username string(64) NOT NULL,
-    flags int NOT NULL DEFAULT '0',
-    uri_idx1 UNIQUE (username, did, flags, ),
-    uri_uid UNIQUE (uid, flags, )
+    flags int NOT NULL DEFAULT '0'
 );
 
 CREATE TABLE speed_dial (

+ 9 - 6
scripts/postgres/pg_create.sql

@@ -70,8 +70,8 @@ CREATE TABLE missed_calls (
     sip_to VARCHAR(255),
     sip_status VARCHAR(128),
     sip_method VARCHAR(16),
-    inbound_ruri VARCHAR(255),
-    outbound_ruri VARCHAR(255),
+    in_ruri VARCHAR(255),
+    out_ruri VARCHAR(255),
     from_uri VARCHAR(255),
     to_uri VARCHAR(255),
     sip_callid VARCHAR(255),
@@ -80,6 +80,8 @@ CREATE TABLE missed_calls (
     digest_realm VARCHAR(255),
     from_tag VARCHAR(128),
     to_tag VARCHAR(128),
+    src_ip INTEGER,
+    src_port SMALLINT,
     request_timestamp TIMESTAMP NOT NULL,
     response_timestamp TIMESTAMP NOT NULL,
     flags INTEGER NOT NULL DEFAULT '0',
@@ -153,7 +155,7 @@ CREATE TABLE domain (
     domain VARCHAR(128) NOT NULL,
     last_modified TIMESTAMP NOT NULL,
     flags INTEGER NOT NULL DEFAULT '0',
-    CONSTRAINT domain_idx UNIQUE (did, domain)
+    CONSTRAINT domain_idx UNIQUE (domain)
 );
 
 CREATE TABLE location (
@@ -272,11 +274,12 @@ CREATE TABLE uri (
     uid VARCHAR(64) NOT NULL,
     did VARCHAR(64) NOT NULL,
     username VARCHAR(64) NOT NULL,
-    flags INTEGER NOT NULL DEFAULT '0',
-    CONSTRAINT uri_idx1 UNIQUE (username, did, flags),
-    CONSTRAINT uri_uid UNIQUE (uid, flags)
+    flags INTEGER NOT NULL DEFAULT '0'
 );
 
+CREATE INDEX uri_idx1 ON uri (username, did);
+CREATE INDEX uri_uid ON uri (uid);
+
 CREATE TABLE speed_dial (
     id SERIAL NOT NULL,
     uid VARCHAR(64) NOT NULL,