Przeglądaj źródła

kamctl: regenerated db scripts to include presentity ruid column

Charles Chance 7 lat temu
rodzic
commit
a4034c1d08

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

@@ -1,5 +1,5 @@
 METADATA_COLUMNS
 METADATA_COLUMNS
-id(int) username(str) domain(str) event(str) etag(str) expires(int) received_time(int) body(str) sender(str) priority(int)
+id(int) username(str) domain(str) event(str) etag(str) expires(int) received_time(int) body(str) sender(str) priority(int) ruid(str)
 METADATA_KEY
 METADATA_KEY
 1 2 3 
 1 2 3 
 METADATA_READONLY
 METADATA_READONLY
@@ -7,4 +7,4 @@ METADATA_READONLY
 METADATA_LOGFLAGS
 METADATA_LOGFLAGS
 0
 0
 METADATA_DEFAULTS
 METADATA_DEFAULTS
-NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|0
+NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|0|NIL

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

@@ -91,7 +91,7 @@ pdt|1
 pl_pipes|
 pl_pipes|
 pl_pipes|1
 pl_pipes|1
 presentity|
 presentity|
-presentity|4
+presentity|5
 pua|
 pua|
 pua|7
 pua|7
 purplemap|
 purplemap|

+ 4 - 2
utils/kamctl/db_sqlite/presence-create.sql

@@ -9,13 +9,15 @@ CREATE TABLE presentity (
     body BLOB NOT NULL,
     body BLOB NOT NULL,
     sender VARCHAR(128) NOT NULL,
     sender VARCHAR(128) NOT NULL,
     priority INTEGER DEFAULT 0 NOT NULL,
     priority INTEGER DEFAULT 0 NOT NULL,
-    CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
+    ruid VARCHAR(64),
+    CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag),
+    CONSTRAINT presentity_ruid_idx UNIQUE (ruid)
 );
 );
 
 
 CREATE INDEX presentity_presentity_expires ON presentity (expires);
 CREATE INDEX presentity_presentity_expires ON presentity (expires);
 CREATE INDEX presentity_account_idx ON presentity (username, domain, event);
 CREATE INDEX presentity_account_idx ON presentity (username, domain, event);
 
 
-INSERT INTO version (table_name, table_version) values ('presentity','4');
+INSERT INTO version (table_name, table_version) values ('presentity','5');
 
 
 CREATE TABLE active_watchers (
 CREATE TABLE active_watchers (
     id INTEGER PRIMARY KEY NOT NULL,
     id INTEGER PRIMARY KEY NOT NULL,

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

@@ -1 +1 @@
-id(int,auto) username(string) domain(string) event(string) etag(string) expires(int) received_time(int) body(string) sender(string) priority(int) 
+id(int,auto) username(string) domain(string) event(string) etag(string) expires(int) received_time(int) body(string) sender(string) priority(int) ruid(string,null) 

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

@@ -40,7 +40,7 @@ mtree:1
 mtrees:2
 mtrees:2
 pdt:1
 pdt:1
 pl_pipes:1
 pl_pipes:1
-presentity:4
+presentity:5
 pua:7
 pua:7
 purplemap:1
 purplemap:1
 re_grp:1
 re_grp:1

+ 6 - 1
utils/kamctl/mongodb/kamailio/presentity.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "presentity",
   "name": "presentity",
-  "version": 4,
+  "version": 5,
   "columns": [
   "columns": [
     "id": {
     "id": {
       "type": "int",
       "type": "int",
@@ -51,6 +51,11 @@
       "type": "int",
       "type": "int",
       "default": 0,
       "default": 0,
       "null": false
       "null": false
+    },
+    "ruid": {
+      "type": "string",
+      "default": null,
+      "null": true
     }
     }
   ]
   ]
 }
 }

+ 1 - 1
utils/kamctl/mongodb/kamailio/version-create.mongo

@@ -40,7 +40,7 @@ db.getCollection("version").insert({ table_name: "mtree", table_version: NumberI
 db.getCollection("version").insert({ table_name: "mtrees", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "mtrees", table_version: NumberInt(2) });
 db.getCollection("version").insert({ table_name: "pdt", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "pdt", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "pl_pipes", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "pl_pipes", table_version: NumberInt(1) });
-db.getCollection("version").insert({ table_name: "presentity", table_version: NumberInt(4) });
+db.getCollection("version").insert({ table_name: "presentity", table_version: NumberInt(5) });
 db.getCollection("version").insert({ table_name: "pua", table_version: NumberInt(7) });
 db.getCollection("version").insert({ table_name: "pua", table_version: NumberInt(7) });
 db.getCollection("version").insert({ table_name: "purplemap", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "purplemap", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "re_grp", table_version: NumberInt(1) });
 db.getCollection("version").insert({ table_name: "re_grp", table_version: NumberInt(1) });

+ 4 - 2
utils/kamctl/mysql/presence-create.sql

@@ -9,13 +9,15 @@ CREATE TABLE `presentity` (
     `body` BLOB NOT NULL,
     `body` BLOB NOT NULL,
     `sender` VARCHAR(128) NOT NULL,
     `sender` VARCHAR(128) NOT NULL,
     `priority` INT(11) DEFAULT 0 NOT NULL,
     `priority` INT(11) DEFAULT 0 NOT NULL,
-    CONSTRAINT presentity_idx UNIQUE (`username`, `domain`, `event`, `etag`)
+    `ruid` VARCHAR(64),
+    CONSTRAINT presentity_idx UNIQUE (`username`, `domain`, `event`, `etag`),
+    CONSTRAINT ruid_idx UNIQUE (`ruid`)
 );
 );
 
 
 CREATE INDEX presentity_expires ON presentity (`expires`);
 CREATE INDEX presentity_expires ON presentity (`expires`);
 CREATE INDEX account_idx ON presentity (`username`, `domain`, `event`);
 CREATE INDEX account_idx ON presentity (`username`, `domain`, `event`);
 
 
-INSERT INTO version (table_name, table_version) values ('presentity','4');
+INSERT INTO version (table_name, table_version) values ('presentity','5');
 
 
 CREATE TABLE `active_watchers` (
 CREATE TABLE `active_watchers` (
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,

+ 4 - 2
utils/kamctl/oracle/presence-create.sql

@@ -9,7 +9,9 @@ CREATE TABLE presentity (
     body BLOB,
     body BLOB,
     sender VARCHAR2(128),
     sender VARCHAR2(128),
     priority NUMBER(10) DEFAULT 0 NOT NULL,
     priority NUMBER(10) DEFAULT 0 NOT NULL,
-    CONSTRAINT presentity_presentity_idx  UNIQUE (username, domain, event, etag)
+    ruid VARCHAR2(64),
+    CONSTRAINT presentity_presentity_idx  UNIQUE (username, domain, event, etag),
+    CONSTRAINT presentity_ruid_idx  UNIQUE (ruid)
 );
 );
 
 
 CREATE OR REPLACE TRIGGER presentity_tr
 CREATE OR REPLACE TRIGGER presentity_tr
@@ -23,7 +25,7 @@ BEGIN map2users('presentity'); END;
 CREATE INDEX presentity_presentity_expires  ON presentity (expires);
 CREATE INDEX presentity_presentity_expires  ON presentity (expires);
 CREATE INDEX presentity_account_idx  ON presentity (username, domain, event);
 CREATE INDEX presentity_account_idx  ON presentity (username, domain, event);
 
 
-INSERT INTO version (table_name, table_version) values ('presentity','4');
+INSERT INTO version (table_name, table_version) values ('presentity','5');
 
 
 CREATE TABLE active_watchers (
 CREATE TABLE active_watchers (
     id NUMBER(10) PRIMARY KEY,
     id NUMBER(10) PRIMARY KEY,

+ 4 - 2
utils/kamctl/postgres/presence-create.sql

@@ -9,13 +9,15 @@ CREATE TABLE presentity (
     body BYTEA NOT NULL,
     body BYTEA NOT NULL,
     sender VARCHAR(128) NOT NULL,
     sender VARCHAR(128) NOT NULL,
     priority INTEGER DEFAULT 0 NOT NULL,
     priority INTEGER DEFAULT 0 NOT NULL,
-    CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
+    ruid VARCHAR(64),
+    CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag),
+    CONSTRAINT presentity_ruid_idx UNIQUE (ruid)
 );
 );
 
 
 CREATE INDEX presentity_presentity_expires ON presentity (expires);
 CREATE INDEX presentity_presentity_expires ON presentity (expires);
 CREATE INDEX presentity_account_idx ON presentity (username, domain, event);
 CREATE INDEX presentity_account_idx ON presentity (username, domain, event);
 
 
-INSERT INTO version (table_name, table_version) values ('presentity','4');
+INSERT INTO version (table_name, table_version) values ('presentity','5');
 
 
 CREATE TABLE active_watchers (
 CREATE TABLE active_watchers (
     id SERIAL PRIMARY KEY NOT NULL,
     id SERIAL PRIMARY KEY NOT NULL,

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

@@ -507,6 +507,7 @@
 		<column><field>body</field><type>DB1_BLOB</type></column>
 		<column><field>body</field><type>DB1_BLOB</type></column>
 		<column><field>sender</field><type>DB1_STR</type></column>
 		<column><field>sender</field><type>DB1_STR</type></column>
 		<column><field>priority</field><type>DB1_INT</type></column>
 		<column><field>priority</field><type>DB1_INT</type></column>
+		<column><field>ruid</field><type>DB1_STR</type></column>
 	</db_table>
 	</db_table>
 	<!-- Declaration of active_watchers table-->
 	<!-- Declaration of active_watchers table-->
 	<db_table id="active_watchers">
 	<db_table id="active_watchers">
@@ -2970,6 +2971,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
 		<cmd><cmd_name>add</cmd_name>
@@ -2985,6 +2987,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
 		<cmd><cmd_name>update</cmd_name>
@@ -3003,6 +3006,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>
 		<cmd><cmd_name>delete</cmd_name>

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

@@ -14,6 +14,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
 		<cmd><cmd_name>add</cmd_name>
@@ -29,6 +30,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
 		<cmd><cmd_name>update</cmd_name>
@@ -47,6 +49,7 @@
 				<col><field>body</field></col>
 				<col><field>body</field></col>
 				<col><field>sender</field></col>
 				<col><field>sender</field></col>
 				<col><field>priority</field></col>
 				<col><field>priority</field></col>
+				<col><field>ruid</field></col>
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>
 		<cmd><cmd_name>delete</cmd_name>

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

@@ -12,6 +12,7 @@
 		<column><field>body</field><type>DB1_BLOB</type></column>
 		<column><field>body</field><type>DB1_BLOB</type></column>
 		<column><field>sender</field><type>DB1_STR</type></column>
 		<column><field>sender</field><type>DB1_STR</type></column>
 		<column><field>priority</field><type>DB1_INT</type></column>
 		<column><field>priority</field><type>DB1_INT</type></column>
+		<column><field>ruid</field><type>DB1_STR</type></column>
 	</db_table>
 	</db_table>
 	<!-- Declaration of active_watchers table-->
 	<!-- Declaration of active_watchers table-->
 	<db_table id="active_watchers">
 	<db_table id="active_watchers">