core, lib, modules: restructured source code tree
[sip-router] / src / lib / srdb1 / schema / rls_watchers.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN" 
3   "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
4
5 <!ENTITY % entities SYSTEM "entities.xml">
6 %entities;
7
8 ]>
9
10 <table id="rls_watchers" xmlns:db="http://docbook.org/ns/docbook">
11     <name>rls_watchers</name>
12     <version>3</version>
13     <type db="mysql">&MYSQL_TABLE_TYPE;</type>
14     <description>
15         <db:para>Table for RLS module used for storing resource lists subscribe
16                  information.
17         </db:para>
18     </description>
19
20     <column id="id">
21         <name>id</name>
22         <type>unsigned int</type>
23         <size>&table_id_len;</size>
24         <autoincrement/>
25         <primary/>
26         <type db="dbtext">int,auto</type>
27         <description>Unique ID</description>
28     </column>
29
30     <column id="presentity_uri">
31         <name>presentity_uri</name>
32         <type>string</type>
33         <size>&uri_len;</size>
34         <description>Presence URI</description>
35     </column>
36
37     <column>
38         <name>to_user</name>
39         <type>string</type>
40         <size>&user_len;</size>
41         <description>To user</description>
42     </column>
43
44     <column>
45         <name>to_domain</name>
46         <type>string</type>
47         <size>&domain_len;</size>
48         <description>To domain</description>
49     </column>
50
51     <column id="watcher_username">
52         <name>watcher_username</name>
53         <type>string</type>
54         <size>&user_len;</size>
55         <description>From user</description>
56         <natural/>
57     </column>
58
59     <column id="watcher_domain">
60         <name>watcher_domain</name>
61         <type>string</type>
62         <size>&domain_len;</size>
63         <description>From domain</description>
64         <natural/>
65     </column>
66
67     <column id="event">
68         <name>event</name>
69         <type>string</type>
70         <size>&user_len;</size>
71         <default>presence</default>
72         <description>Event description</description>
73     </column>
74
75     <column>
76         <name>event_id</name>
77         <type>string</type>
78         <size>&user_len;</size>
79         <null/>
80         <description>Event ID</description>
81     </column>
82
83     <column id="to_tag">
84         <name>to_tag</name>
85         <type>string</type>
86         <size>&domain_len;</size>
87         <description>To tag</description>
88     </column>
89
90     <column id="from_tag">
91         <name>from_tag</name>
92         <type>string</type>
93         <size>&domain_len;</size>
94         <description>From tag</description>
95     </column>
96
97     <column id="callid">
98         <name>callid</name>
99         <type>string</type>
100         <size>&callid_len;</size>
101         <description>Call ID</description>
102     </column>
103
104     <column>
105         <name>local_cseq</name>
106         <type>int</type>
107         <size>&cseq_len;</size>
108         <description>Local cseq</description>
109     </column>
110
111     <column>
112         <name>remote_cseq</name>
113         <type>int</type>
114         <size>&cseq_len;</size>
115         <description>Remote cseq</description>
116     </column>
117
118     <column>
119         <name>contact</name>
120         <type>string</type>
121         <size>&uri_len;</size>
122         <description>Contact</description>
123     </column>
124
125     <column>
126         <name>record_route</name>
127         <type>text</type>
128         <null/>
129         <description>Record route</description>
130     </column>
131
132     <column id="expires">
133         <name>expires</name>
134         <type>int</type>
135         <size>&expires_len;</size>
136         <description>Expires</description>
137     </column>
138
139     <column>
140         <name>status</name>
141         <type>int</type>
142         <size>11</size>
143         <default>2</default>
144         <description>Status</description>
145     </column>
146
147     <column>
148         <name>reason</name>
149         <type>string</type>
150         <size>&user_len;</size>
151         <description>Reason</description>
152     </column>
153
154     <column>
155         <name>version</name>
156         <type>int</type>
157         <size>11</size>
158         <default>0</default>
159         <description>Version</description>
160     </column>
161
162     <column>
163         <name>socket_info</name>
164         <type>string</type>
165         <size>&domain_len;</size>
166         <description>Socket info</description>
167     </column>
168
169     <column>
170         <name>local_contact</name>
171         <type>string</type>
172         <size>&uri_len;</size>
173         <description>Local contact</description>
174     </column>
175
176     <column>
177         <name>from_user</name>
178         <type>string</type>
179         <size>&user_len;</size>
180         <description>From user</description>
181     </column>
182
183     <column>
184         <name>from_domain</name>
185         <type>string</type>
186         <size>&domain_len;</size>
187         <description>From domain</description>
188     </column>
189
190     <column id="updated">
191         <name>updated</name>
192         <type>int</type>
193         <size>&expires_len;</size>
194         <description>Update flag</description>
195     </column>
196
197     <index>
198         <name>rls_watcher_idx</name>
199         <colref linkend="callid"/>
200         <colref linkend="to_tag"/>
201         <colref linkend="from_tag"/>
202         <unique/>
203     </index>
204
205     <index>
206         <name>rls_watchers_update</name>
207         <colref linkend="watcher_username"/>
208         <colref linkend="watcher_domain"/>
209         <colref linkend="event"/>
210     </index>
211
212     <index>
213         <name>rls_watchers_expires</name>
214         <colref linkend="expires"/>
215     </index>
216
217     <index>
218         <name>updated_idx</name>
219         <colref linkend="updated"/>
220         <description>This index is needed only if you use DB_ONLY mode. If possible use a partial index WHERE (updated &lt;&gt;(-1))</description>
221     </index>
222 </table>