Explorar o código

kamctl: regenerated db creation scripts

Daniel-Constantin Mierla %!s(int64=8) %!d(string=hai) anos
pai
achega
50e79b6941

+ 3 - 3
utils/kamctl/db_berkeley/kamailio/rtpengine

@@ -1,10 +1,10 @@
 METADATA_COLUMNS
 METADATA_COLUMNS
-setid(int) url(str) weight(int) disabled(int) stamp(datetime)
+id(int) setid(int) url(str) weight(int) disabled(int) stamp(datetime)
 METADATA_KEY
 METADATA_KEY
-0 2 3 4
+1 3 4 5
 METADATA_READONLY
 METADATA_READONLY
 0
 0
 METADATA_LOGFLAGS
 METADATA_LOGFLAGS
 0
 0
 METADATA_DEFAULTS
 METADATA_DEFAULTS
-0|NIL|1|0|'1900-01-01 00:00:01'
+NIL|0|NIL|1|0|'1900-01-01 00:00:01'

+ 1 - 0
utils/kamctl/db_sqlite/rtpengine-create.sql

@@ -1,4 +1,5 @@
 CREATE TABLE rtpengine (
 CREATE TABLE rtpengine (
+    id INTEGER PRIMARY KEY NOT NULL,
     setid INTEGER DEFAULT 0 NOT NULL,
     setid INTEGER DEFAULT 0 NOT NULL,
     url VARCHAR(64) NOT NULL,
     url VARCHAR(64) NOT NULL,
     weight INTEGER DEFAULT 1 NOT NULL,
     weight INTEGER DEFAULT 1 NOT NULL,

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

@@ -1 +1 @@
-setid(int) url(string) weight(int) disabled(int) stamp(int) 
+id(int,auto) setid(int) url(string) weight(int) disabled(int) stamp(int) 

+ 5 - 0
utils/kamctl/mongodb/kamailio/rtpengine.json

@@ -2,6 +2,11 @@
   "name": "rtpengine",
   "name": "rtpengine",
   "version": 1,
   "version": 1,
   "columns": [
   "columns": [
+    "id": {
+      "type": "int",
+      "default": null,
+      "null": false
+    },
     "setid": {
     "setid": {
       "type": "int",
       "type": "int",
       "default": 0,
       "default": 0,

+ 3 - 0
utils/kamctl/mongodb/kamailio/version-create.mongo

@@ -46,12 +46,15 @@ db.getCollection("version").insert({ table_name: "purplemap", table_version: Num
 db.getCollection("version").insert({ table_name: "re_grp", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "re_grp", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rls_presentity", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rls_presentity", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rls_watchers", table_version: NumberInt(3) });
 db.getCollection("version").insert({ table_name: "rls_watchers", table_version: NumberInt(3) });
+db.getCollection("version").insert({ table_name: "rtpengine", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rtpproxy", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "rtpproxy", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "sca_subscriptions", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "sca_subscriptions", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "silo", table_version: NumberInt(8) });
 db.getCollection("version").insert({ table_name: "silo", table_version: NumberInt(8) });
 db.getCollection("version").insert({ table_name: "sip_trace", table_version: NumberInt(4) });
 db.getCollection("version").insert({ table_name: "sip_trace", table_version: NumberInt(4) });
 db.getCollection("version").insert({ table_name: "speed_dial", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "speed_dial", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "subscriber", table_version: NumberInt(7) });
 db.getCollection("version").insert({ table_name: "subscriber", table_version: NumberInt(7) });
+db.getCollection("version").insert({ table_name: "topos_d", table_version: NumberInt(1) });
+db.getCollection("version").insert({ table_name: "topos_t", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "trusted", table_version: NumberInt(6) });
 db.getCollection("version").insert({ table_name: "trusted", table_version: NumberInt(6) });
 db.getCollection("version").insert({ table_name: "uacreg", table_version: NumberInt(3) });
 db.getCollection("version").insert({ table_name: "uacreg", table_version: NumberInt(3) });
 db.getCollection("version").insert({ table_name: "uid_credentials", table_version: NumberInt(7) });
 db.getCollection("version").insert({ table_name: "uid_credentials", table_version: NumberInt(7) });

+ 1 - 0
utils/kamctl/mysql/rtpengine-create.sql

@@ -1,4 +1,5 @@
 CREATE TABLE `rtpengine` (
 CREATE TABLE `rtpengine` (
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     `setid` INT(10) UNSIGNED DEFAULT 0 NOT NULL,
     `setid` INT(10) UNSIGNED DEFAULT 0 NOT NULL,
     `url` VARCHAR(64) NOT NULL,
     `url` VARCHAR(64) NOT NULL,
     `weight` INT(10) UNSIGNED DEFAULT 1 NOT NULL,
     `weight` INT(10) UNSIGNED DEFAULT 1 NOT NULL,

+ 1 - 0
utils/kamctl/oracle/rtpengine-create.sql

@@ -1,4 +1,5 @@
 CREATE TABLE rtpengine (
 CREATE TABLE rtpengine (
+    id NUMBER(10) PRIMARY KEY,
     setid NUMBER(10) DEFAULT 0 NOT NULL,
     setid NUMBER(10) DEFAULT 0 NOT NULL,
     url VARCHAR2(64),
     url VARCHAR2(64),
     weight NUMBER(10) DEFAULT 1 NOT NULL,
     weight NUMBER(10) DEFAULT 1 NOT NULL,

+ 1 - 0
utils/kamctl/postgres/rtpengine-create.sql

@@ -1,4 +1,5 @@
 CREATE TABLE rtpengine (
 CREATE TABLE rtpengine (
+    id SERIAL PRIMARY KEY NOT NULL,
     setid INTEGER DEFAULT 0 NOT NULL,
     setid INTEGER DEFAULT 0 NOT NULL,
     url VARCHAR(64) NOT NULL,
     url VARCHAR(64) NOT NULL,
     weight INTEGER DEFAULT 1 NOT NULL,
     weight INTEGER DEFAULT 1 NOT NULL,

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

@@ -676,6 +676,7 @@
 	<db_table id="rtpengine">
 	<db_table id="rtpengine">
 		<table_name>rtpengine</table_name>
 		<table_name>rtpengine</table_name>
 		<db_url_id>mysql</db_url_id>
 		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
 		<column><field>setid</field><type>DB1_INT</type></column>
 		<column><field>setid</field><type>DB1_INT</type></column>
 		<column><field>url</field><type>DB1_STR</type></column>
 		<column><field>url</field><type>DB1_STR</type></column>
 		<column><field>weight</field><type>DB1_INT</type></column>
 		<column><field>weight</field><type>DB1_INT</type></column>
@@ -3622,6 +3623,7 @@
 			<db_table_id>rtpengine</db_table_id>
 			<db_table_id>rtpengine</db_table_id>
 			<cmd_type>DB1_QUERY</cmd_type>
 			<cmd_type>DB1_QUERY</cmd_type>
 			<query_cols>
 			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
 				<col><field>setid</field></col>
 				<col><field>setid</field></col>
 				<col><field>url</field></col>
 				<col><field>url</field></col>
 				<col><field>weight</field></col>
 				<col><field>weight</field></col>
@@ -3640,6 +3642,27 @@
 				<col><field>stamp</field></col>
 				<col><field>stamp</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>rtpengine</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>setid</field></col>
+				<col><field>url</field></col>
+				<col><field>weight</field></col>
+				<col><field>disabled</field></col>
+				<col><field>stamp</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>rtpengine</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
 	</mod>
 	</mod>
 	<!-- rtpproxy provisionning -->
 	<!-- rtpproxy provisionning -->
 	<mod><mod_name>rtpproxy</mod_name>
 	<mod><mod_name>rtpproxy</mod_name>

+ 22 - 0
utils/kamctl/xhttp_pi/rtpengine-mod

@@ -4,6 +4,7 @@
 			<db_table_id>rtpengine</db_table_id>
 			<db_table_id>rtpengine</db_table_id>
 			<cmd_type>DB1_QUERY</cmd_type>
 			<cmd_type>DB1_QUERY</cmd_type>
 			<query_cols>
 			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
 				<col><field>setid</field></col>
 				<col><field>setid</field></col>
 				<col><field>url</field></col>
 				<col><field>url</field></col>
 				<col><field>weight</field></col>
 				<col><field>weight</field></col>
@@ -22,4 +23,25 @@
 				<col><field>stamp</field></col>
 				<col><field>stamp</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>rtpengine</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>setid</field></col>
+				<col><field>url</field></col>
+				<col><field>weight</field></col>
+				<col><field>disabled</field></col>
+				<col><field>stamp</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>rtpengine</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
 	</mod>
 	</mod>

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

@@ -2,6 +2,7 @@
 	<db_table id="rtpengine">
 	<db_table id="rtpengine">
 		<table_name>rtpengine</table_name>
 		<table_name>rtpengine</table_name>
 		<db_url_id>mysql</db_url_id>
 		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
 		<column><field>setid</field><type>DB1_INT</type></column>
 		<column><field>setid</field><type>DB1_INT</type></column>
 		<column><field>url</field><type>DB1_STR</type></column>
 		<column><field>url</field><type>DB1_STR</type></column>
 		<column><field>weight</field><type>DB1_INT</type></column>
 		<column><field>weight</field><type>DB1_INT</type></column>