Browse code

kamctl: update speeddial schema

Fabricio Santolin da Silva authored on 28/09/2022 10:09:24
Showing 14 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 METADATA_COLUMNS
2
-id(int) username(str) domain(str) sd_username(str) sd_domain(str) new_uri(str) fname(str) lname(str) description(str)
2
+id(int) username(str) domain(str) sd_username(str) sd_domain(str) new_uri(str) fname(str) lname(str) description(str) group_id(str)
3 3
 METADATA_KEY
4 4
 1 2 
5 5
 METADATA_READONLY
... ...
@@ -7,4 +7,4 @@ METADATA_READONLY
7 7
 METADATA_LOGFLAGS
8 8
 0
9 9
 METADATA_DEFAULTS
10
-NIL|''|''|''|''|''|''|''|''
10
+NIL|''|''|''|''|''|''|''|''|''
... ...
@@ -115,7 +115,7 @@ silo|8
115 115
 sip_trace|
116 116
 sip_trace|4
117 117
 speed_dial|
118
-speed_dial|2
118
+speed_dial|3
119 119
 subscriber|
120 120
 subscriber|7
121 121
 topos_d|
... ...
@@ -1,2 +1,2 @@
1
-id/int,username/string,domain/string,sd_username/string,sd_domain/string,new_uri/string,fname/string,lname/string,description/string,
2
-2
1
+id/int,username/string,domain/string,sd_username/string,sd_domain/string,new_uri/string,fname/string,lname/string,description/string,group_id/string,
2
+3
... ...
@@ -8,6 +8,7 @@ CREATE TABLE speed_dial (
8 8
     fname VARCHAR(64) DEFAULT '' NOT NULL,
9 9
     lname VARCHAR(64) DEFAULT '' NOT NULL,
10 10
     description VARCHAR(64) DEFAULT '' NOT NULL,
11
+    group_id VARCHAR(128) DEFAULT '' NOT NULL,
11 12
     CONSTRAINT speed_dial_speed_dial_idx UNIQUE (username, domain, sd_domain, sd_username)
12 13
 );
13 14
 
... ...
@@ -1 +1 @@
1
-id(int,auto) username(string) domain(string) sd_username(string) sd_domain(string) new_uri(string) fname(string) lname(string) description(string) 
1
+id(int,auto) username(string) domain(string) sd_username(string) sd_domain(string) new_uri(string) fname(string) lname(string) description(string) group_id(string) 
... ...
@@ -52,7 +52,7 @@ id(int,auto) table_name(string) table_version(int)
52 52
 0:secfilter:1
53 53
 0:silo:8
54 54
 0:sip_trace:4
55
-0:speed_dial:2
55
+0:speed_dial:3
56 56
 0:subscriber:7
57 57
 0:topos_d:2
58 58
 0:topos_t:2
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "speed_dial",
3
-  "version": 2,
3
+  "version": 3,
4 4
   "columns": [
5 5
     "id": {
6 6
       "type": "int",
... ...
@@ -46,6 +46,11 @@
46 46
       "type": "string",
47 47
       "default": "",
48 48
       "null": false
49
+    },
50
+    "group_id": {
51
+      "type": "string",
52
+      "default": "",
53
+      "null": false
49 54
     }
50 55
   ]
51 56
 }
52 57
\ No newline at end of file
... ...
@@ -52,7 +52,7 @@ db.getCollection("version").insert({ table_name: "sca_subscriptions", table_vers
52 52
 db.getCollection("version").insert({ table_name: "secfilter", table_version: NumberInt(1) });
53 53
 db.getCollection("version").insert({ table_name: "silo", table_version: NumberInt(8) });
54 54
 db.getCollection("version").insert({ table_name: "sip_trace", table_version: NumberInt(4) });
55
-db.getCollection("version").insert({ table_name: "speed_dial", table_version: NumberInt(2) });
55
+db.getCollection("version").insert({ table_name: "speed_dial", table_version: NumberInt(3) });
56 56
 db.getCollection("version").insert({ table_name: "subscriber", table_version: NumberInt(7) });
57 57
 db.getCollection("version").insert({ table_name: "topos_d", table_version: NumberInt(2) });
58 58
 db.getCollection("version").insert({ table_name: "topos_t", table_version: NumberInt(2) });
... ...
@@ -8,6 +8,7 @@ CREATE TABLE `speed_dial` (
8 8
     `fname` VARCHAR(64) DEFAULT '' NOT NULL,
9 9
     `lname` VARCHAR(64) DEFAULT '' NOT NULL,
10 10
     `description` VARCHAR(64) DEFAULT '' NOT NULL,
11
+    `group_id` VARCHAR(128) DEFAULT '' NOT NULL,
11 12
     CONSTRAINT speed_dial_idx UNIQUE (`username`, `domain`, `sd_domain`, `sd_username`)
12 13
 );
13 14
 
... ...
@@ -8,6 +8,7 @@ CREATE TABLE speed_dial (
8 8
     fname VARCHAR2(64) DEFAULT '',
9 9
     lname VARCHAR2(64) DEFAULT '',
10 10
     description VARCHAR2(64) DEFAULT '',
11
+    group_id VARCHAR2(128) DEFAULT '',
11 12
     CONSTRAINT speed_dial_speed_dial_idx  UNIQUE (username, domain, sd_domain, sd_username)
12 13
 );
13 14
 
... ...
@@ -8,6 +8,7 @@ CREATE TABLE speed_dial (
8 8
     fname VARCHAR(64) DEFAULT '' NOT NULL,
9 9
     lname VARCHAR(64) DEFAULT '' NOT NULL,
10 10
     description VARCHAR(64) DEFAULT '' NOT NULL,
11
+    group_id VARCHAR(128) DEFAULT '' NOT NULL,
11 12
     CONSTRAINT speed_dial_speed_dial_idx UNIQUE (username, domain, sd_domain, sd_username)
12 13
 );
13 14
 
... ...
@@ -219,6 +219,17 @@
219 219
 		<column><field>attrs</field><type>DB1_STR</type></column>
220 220
 		<column><field>description</field><type>DB1_STR</type></column>
221 221
 	</db_table>
222
+	<!-- Declaration of domainpolicy table-->
223
+	<db_table id="domainpolicy">
224
+		<table_name>domainpolicy</table_name>
225
+		<db_url_id>mysql</db_url_id>
226
+		<column><field>id</field><type>DB1_INT</type></column>
227
+		<column><field>rule</field><type>DB1_STR</type></column>
228
+		<column><field>type</field><type>DB1_STR</type></column>
229
+		<column><field>att</field><type>DB1_STR</type></column>
230
+		<column><field>val</field><type>DB1_STR</type></column>
231
+		<column><field>description</field><type>DB1_STR</type></column>
232
+	</db_table>
222 233
 	<!-- Declaration of domain table-->
223 234
 	<db_table id="domain">
224 235
 		<table_name>domain</table_name>
... ...
@@ -239,17 +250,6 @@
239 250
 		<column><field>value</field><type>DB1_STR</type></column>
240 251
 		<column><field>last_modified</field><type>DB1_DATETIME</type></column>
241 252
 	</db_table>
242
-	<!-- Declaration of domainpolicy table-->
243
-	<db_table id="domainpolicy">
244
-		<table_name>domainpolicy</table_name>
245
-		<db_url_id>mysql</db_url_id>
246
-		<column><field>id</field><type>DB1_INT</type></column>
247
-		<column><field>rule</field><type>DB1_STR</type></column>
248
-		<column><field>type</field><type>DB1_STR</type></column>
249
-		<column><field>att</field><type>DB1_STR</type></column>
250
-		<column><field>val</field><type>DB1_STR</type></column>
251
-		<column><field>description</field><type>DB1_STR</type></column>
252
-	</db_table>
253 253
 	<!-- Declaration of dr_gateways table-->
254 254
 	<db_table id="dr_gateways">
255 255
 		<table_name>dr_gateways</table_name>
... ...
@@ -753,6 +753,7 @@
753 753
 		<column><field>fname</field><type>DB1_STR</type></column>
754 754
 		<column><field>lname</field><type>DB1_STR</type></column>
755 755
 		<column><field>description</field><type>DB1_STR</type></column>
756
+		<column><field>group_id</field><type>DB1_STR</type></column>
756 757
 	</db_table>
757 758
 	<!-- Declaration of version table-->
758 759
 	<db_table id="version">
... ...
@@ -3937,6 +3938,7 @@
3937 3938
 				<col><field>fname</field></col>
3938 3939
 				<col><field>lname</field></col>
3939 3940
 				<col><field>description</field></col>
3941
+				<col><field>group_id</field></col>
3940 3942
 			</query_cols>
3941 3943
 		</cmd>
3942 3944
 		<cmd><cmd_name>add</cmd_name>
... ...
@@ -3951,6 +3953,7 @@
3951 3953
 				<col><field>fname</field></col>
3952 3954
 				<col><field>lname</field></col>
3953 3955
 				<col><field>description</field></col>
3956
+				<col><field>group_id</field></col>
3954 3957
 			</query_cols>
3955 3958
 		</cmd>
3956 3959
 		<cmd><cmd_name>update</cmd_name>
... ...
@@ -3968,6 +3971,7 @@
3968 3971
 				<col><field>fname</field></col>
3969 3972
 				<col><field>lname</field></col>
3970 3973
 				<col><field>description</field></col>
3974
+				<col><field>group_id</field></col>
3971 3975
 			</query_cols>
3972 3976
 		</cmd>
3973 3977
 		<cmd><cmd_name>delete</cmd_name>
... ...
@@ -13,6 +13,7 @@
13 13
 				<col><field>fname</field></col>
14 14
 				<col><field>lname</field></col>
15 15
 				<col><field>description</field></col>
16
+				<col><field>group_id</field></col>
16 17
 			</query_cols>
17 18
 		</cmd>
18 19
 		<cmd><cmd_name>add</cmd_name>
... ...
@@ -27,6 +28,7 @@
27 28
 				<col><field>fname</field></col>
28 29
 				<col><field>lname</field></col>
29 30
 				<col><field>description</field></col>
31
+				<col><field>group_id</field></col>
30 32
 			</query_cols>
31 33
 		</cmd>
32 34
 		<cmd><cmd_name>update</cmd_name>
... ...
@@ -44,6 +46,7 @@
44 46
 				<col><field>fname</field></col>
45 47
 				<col><field>lname</field></col>
46 48
 				<col><field>description</field></col>
49
+				<col><field>group_id</field></col>
47 50
 			</query_cols>
48 51
 		</cmd>
49 52
 		<cmd><cmd_name>delete</cmd_name>
... ...
@@ -11,4 +11,5 @@
11 11
 		<column><field>fname</field><type>DB1_STR</type></column>
12 12
 		<column><field>lname</field><type>DB1_STR</type></column>
13 13
 		<column><field>description</field><type>DB1_STR</type></column>
14
+		<column><field>group_id</field><type>DB1_STR</type></column>
14 15
 	</db_table>