Skip to content

Commit

Permalink
kamctl: regenerated db scripts to include presentity ruid column
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrchance committed Jan 24, 2018
1 parent acd4226 commit a4034c1
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 15 deletions.
4 changes: 2 additions & 2 deletions utils/kamctl/db_berkeley/kamailio/presentity
@@ -1,10 +1,10 @@
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
1 2 3
METADATA_READONLY
0
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|0
NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|NIL|0|NIL
2 changes: 1 addition & 1 deletion utils/kamctl/db_berkeley/kamailio/version
Expand Up @@ -91,7 +91,7 @@ pdt|1
pl_pipes|
pl_pipes|1
presentity|
presentity|4
presentity|5
pua|
pua|7
purplemap|
Expand Down
6 changes: 4 additions & 2 deletions utils/kamctl/db_sqlite/presence-create.sql
Expand Up @@ -9,13 +9,15 @@ CREATE TABLE presentity (
body BLOB NOT NULL,
sender VARCHAR(128) 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_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 (
id INTEGER PRIMARY KEY NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion 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)
2 changes: 1 addition & 1 deletion utils/kamctl/dbtext/kamailio/version
Expand Up @@ -40,7 +40,7 @@ mtree:1
mtrees:2
pdt:1
pl_pipes:1
presentity:4
presentity:5
pua:7
purplemap:1
re_grp:1
Expand Down
7 changes: 6 additions & 1 deletion utils/kamctl/mongodb/kamailio/presentity.json
@@ -1,6 +1,6 @@
{
"name": "presentity",
"version": 4,
"version": 5,
"columns": [
"id": {
"type": "int",
Expand Down Expand Up @@ -51,6 +51,11 @@
"type": "int",
"default": 0,
"null": false
},
"ruid": {
"type": "string",
"default": null,
"null": true
}
]
}
2 changes: 1 addition & 1 deletion utils/kamctl/mongodb/kamailio/version-create.mongo
Expand Up @@ -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: "pdt", 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: "purplemap", table_version: NumberInt(1) });
db.getCollection("version").insert({ table_name: "re_grp", table_version: NumberInt(1) });
Expand Down
6 changes: 4 additions & 2 deletions utils/kamctl/mysql/presence-create.sql
Expand Up @@ -9,13 +9,15 @@ CREATE TABLE `presentity` (
`body` BLOB NOT NULL,
`sender` VARCHAR(128) 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 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` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
Expand Down
6 changes: 4 additions & 2 deletions utils/kamctl/oracle/presence-create.sql
Expand Up @@ -9,7 +9,9 @@ CREATE TABLE presentity (
body BLOB,
sender VARCHAR2(128),
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
Expand All @@ -23,7 +25,7 @@ BEGIN map2users('presentity'); END;
CREATE INDEX presentity_presentity_expires ON presentity (expires);
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 (
id NUMBER(10) PRIMARY KEY,
Expand Down
6 changes: 4 additions & 2 deletions utils/kamctl/postgres/presence-create.sql
Expand Up @@ -9,13 +9,15 @@ CREATE TABLE presentity (
body BYTEA NOT NULL,
sender VARCHAR(128) 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_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 (
id SERIAL PRIMARY KEY NOT NULL,
Expand Down
4 changes: 4 additions & 0 deletions utils/kamctl/xhttp_pi/pi_framework.xml
Expand Up @@ -507,6 +507,7 @@
<column><field>body</field><type>DB1_BLOB</type></column>
<column><field>sender</field><type>DB1_STR</type></column>
<column><field>priority</field><type>DB1_INT</type></column>
<column><field>ruid</field><type>DB1_STR</type></column>
</db_table>
<!-- Declaration of active_watchers table-->
<db_table id="active_watchers">
Expand Down Expand Up @@ -2970,6 +2971,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>add</cmd_name>
Expand All @@ -2985,6 +2987,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>update</cmd_name>
Expand All @@ -3003,6 +3006,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>delete</cmd_name>
Expand Down
3 changes: 3 additions & 0 deletions utils/kamctl/xhttp_pi/presence-mod
Expand Up @@ -14,6 +14,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>add</cmd_name>
Expand All @@ -29,6 +30,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>update</cmd_name>
Expand All @@ -47,6 +49,7 @@
<col><field>body</field></col>
<col><field>sender</field></col>
<col><field>priority</field></col>
<col><field>ruid</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>delete</cmd_name>
Expand Down
1 change: 1 addition & 0 deletions utils/kamctl/xhttp_pi/presence-table
Expand Up @@ -12,6 +12,7 @@
<column><field>body</field><type>DB1_BLOB</type></column>
<column><field>sender</field><type>DB1_STR</type></column>
<column><field>priority</field><type>DB1_INT</type></column>
<column><field>ruid</field><type>DB1_STR</type></column>
</db_table>
<!-- Declaration of active_watchers table-->
<db_table id="active_watchers">
Expand Down

0 comments on commit a4034c1

Please sign in to comment.