Kaynağa Gözat

utils/kamctl: refresh dbschema

See #782
Victor Seva 9 yıl önce
ebeveyn
işleme
47e7a3883f

+ 2 - 2
utils/kamctl/db_berkeley/kamailio/sca_subscriptions

@@ -1,5 +1,5 @@
 METADATA_COLUMNS
-id(int) subscriber(str) aor(str) event(int) expires(int) state(int) app_idx(int) call_id(str) from_tag(str) to_tag(str) record_route(str) notify_cseq(int) subscribe_cseq(int)
+id(int) subscriber(str) aor(str) event(int) expires(int) state(int) app_idx(int) call_id(str) from_tag(str) to_tag(str) record_route(str) notify_cseq(int) subscribe_cseq(int) server_id(int)
 METADATA_KEY
 
 METADATA_READONLY
@@ -7,4 +7,4 @@ METADATA_READONLY
 METADATA_LOGFLAGS
 0
 METADATA_DEFAULTS
-NIL|NIL|NIL|0|0|0|0|NIL|NIL|NIL|NIL|NIL|NIL
+NIL|NIL|NIL|0|0|0|0|NIL|NIL|NIL|NIL|NIL|NIL|0

+ 1 - 1
utils/kamctl/db_berkeley/kamailio/version

@@ -107,7 +107,7 @@ rtpengine|1
 rtpproxy|
 rtpproxy|1
 sca_subscriptions|
-sca_subscriptions|1
+sca_subscriptions|2
 silo|
 silo|8
 sip_trace|

+ 3 - 2
utils/kamctl/db_sqlite/sca-create.sql

@@ -12,11 +12,12 @@ CREATE TABLE sca_subscriptions (
     record_route TEXT,
     notify_cseq INTEGER NOT NULL,
     subscribe_cseq INTEGER NOT NULL,
+    server_id INTEGER DEFAULT 0 NOT NULL,
     CONSTRAINT sca_subscriptions_sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag, to_tag)
 );
 
-CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (expires);
+CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (server_id, expires);
 CREATE INDEX sca_subscriptions_sca_subscribers_idx ON sca_subscriptions (subscriber, event);
 
-INSERT INTO version (table_name, table_version) values ('sca_subscriptions','1');
+INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2');
 

+ 1 - 1
utils/kamctl/dbtext/kamailio/sca_subscriptions

@@ -1 +1 @@
-id(int,auto) subscriber(string) aor(string) event(int) expires(int) state(int) app_idx(int) call_id(string) from_tag(string) to_tag(string) record_route(string,null) notify_cseq(int) subscribe_cseq(int) 
+id(int,auto) subscriber(string) aor(string) event(int) expires(int) state(int) app_idx(int) call_id(string) from_tag(string) to_tag(string) record_route(string,null) notify_cseq(int) subscribe_cseq(int) server_id(int) 

+ 1 - 1
utils/kamctl/dbtext/kamailio/version

@@ -48,7 +48,7 @@ rls_presentity:1
 rls_watchers:3
 rtpengine:1
 rtpproxy:1
-sca_subscriptions:1
+sca_subscriptions:2
 silo:8
 sip_trace:4
 speed_dial:2

+ 3 - 2
utils/kamctl/mysql/sca-create.sql

@@ -12,11 +12,12 @@ CREATE TABLE `sca_subscriptions` (
     `record_route` TEXT,
     `notify_cseq` INT(11) NOT NULL,
     `subscribe_cseq` INT(11) NOT NULL,
+    `server_id` INT(11) DEFAULT 0 NOT NULL,
     CONSTRAINT sca_subscriptions_idx UNIQUE (`subscriber`, `call_id`, `from_tag`, `to_tag`)
 );
 
-CREATE INDEX sca_expires_idx ON sca_subscriptions (`expires`);
+CREATE INDEX sca_expires_idx ON sca_subscriptions (`server_id`, `expires`);
 CREATE INDEX sca_subscribers_idx ON sca_subscriptions (`subscriber`, `event`);
 
-INSERT INTO version (table_name, table_version) values ('sca_subscriptions','1');
+INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2');
 

+ 3 - 2
utils/kamctl/oracle/sca-create.sql

@@ -12,6 +12,7 @@ CREATE TABLE sca_subscriptions (
     record_route CLOB,
     notify_cseq NUMBER(10),
     subscribe_cseq NUMBER(10),
+    server_id NUMBER(10) DEFAULT 0 NOT NULL,
     CONSTRAINT ORA_sca_subscriptions_idx  UNIQUE (subscriber, call_id, from_tag, to_tag)
 );
 
@@ -23,8 +24,8 @@ END sca_subscriptions_tr;
 /
 BEGIN map2users('sca_subscriptions'); END;
 /
-CREATE INDEX ORA_sca_expires_idx  ON sca_subscriptions (expires);
+CREATE INDEX ORA_sca_expires_idx  ON sca_subscriptions (server_id, expires);
 CREATE INDEX ORA_sca_subscribers_idx  ON sca_subscriptions (subscriber, event);
 
-INSERT INTO version (table_name, table_version) values ('sca_subscriptions','1');
+INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2');
 

+ 3 - 2
utils/kamctl/postgres/sca-create.sql

@@ -12,11 +12,12 @@ CREATE TABLE sca_subscriptions (
     record_route TEXT,
     notify_cseq INTEGER NOT NULL,
     subscribe_cseq INTEGER NOT NULL,
+    server_id INTEGER DEFAULT 0 NOT NULL,
     CONSTRAINT sca_subscriptions_sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag, to_tag)
 );
 
-CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (expires);
+CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (server_id, expires);
 CREATE INDEX sca_subscriptions_sca_subscribers_idx ON sca_subscriptions (subscriber, event);
 
-INSERT INTO version (table_name, table_version) values ('sca_subscriptions','1');
+INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2');
 

+ 4 - 0
utils/kamctl/xhttp_pi/pi_framework.xml

@@ -709,6 +709,7 @@
 		<column><field>record_route</field><type>DB1_BLOB</type></column>
 		<column><field>notify_cseq</field><type>DB1_INT</type></column>
 		<column><field>subscribe_cseq</field><type>DB1_INT</type></column>
+		<column><field>server_id</field><type>DB1_INT</type></column>
 	</db_table>
 	<!-- Declaration of sip_trace table-->
 	<db_table id="sip_trace">
@@ -3701,6 +3702,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
@@ -3719,6 +3721,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
@@ -3740,6 +3743,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>

+ 3 - 0
utils/kamctl/xhttp_pi/sca-mod

@@ -17,6 +17,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
@@ -35,6 +36,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
@@ -56,6 +58,7 @@
 				<col><field>record_route</field></col>
 				<col><field>notify_cseq</field></col>
 				<col><field>subscribe_cseq</field></col>
+				<col><field>server_id</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>

+ 1 - 0
utils/kamctl/xhttp_pi/sca-table

@@ -15,4 +15,5 @@
 		<column><field>record_route</field><type>DB1_BLOB</type></column>
 		<column><field>notify_cseq</field><type>DB1_INT</type></column>
 		<column><field>subscribe_cseq</field><type>DB1_INT</type></column>
+		<column><field>server_id</field><type>DB1_INT</type></column>
 	</db_table>