[Release] libprivilege-control_0.0.43.TIZEN
[platform/core/security/libprivilege-control.git] / db / rules-db.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ -->
3 <!-- Active URL: https://mcdsrvbld02.digital.local/wwwsqldesigner/ -->
4 <sql>
5 <datatypes db="sqlite">
6     <group label="Numeric" color="rgb(238,238,170)">
7         <type label="TINYINT" length="0" sql="TINYINT" quote=""/>
8         <type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
9         <type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
10         <type label="INT" length="0" sql="INT" quote=""/>
11         <type label="Integer" length="0" sql="INTEGER" quote=""/>
12         <type label="BIGINT" length="0" sql="BIGINT" quote=""/>
13         <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
14         <type label="Single precision" length="0" sql="FLOAT" quote=""/>
15         <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
16     </group>
17
18     <group label="Character" color="rgb(255,200,200)">
19         <type label="Char" length="1" sql="CHAR" quote="'"/>
20         <type label="Varchar" length="1" sql="VARCHAR" quote="'"/>
21         <type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
22         <type label="Binary" length="1" sql="BINARY" quote="'"/>
23         <type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
24         <type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
25     </group>
26
27     <group label="Date &amp; Time" color="rgb(200,255,200)">
28         <type label="Date" length="0" sql="DATE" quote="'"/>
29         <type label="Time" length="0" sql="TIME" quote="'"/>
30         <type label="Datetime" length="0" sql="DATETIME" quote="'"/>
31         <type label="Year" length="0" sql="YEAR" quote=""/>
32         <type label="Timestamp" length="0" sql="TIMESTAMP" quote="'"/>
33     </group>
34
35     <group label="Miscellaneous" color="rgb(200,200,255)">
36         <type label="ENUM" length="1" sql="ENUM" quote=""/>
37         <type label="SET" length="1" sql="SET" quote=""/>
38         <type label="Bit" length="0" sql="bit" quote=""/>
39     </group>
40 </datatypes><table x="31" y="298" name="app">
41 <row name="app_id" null="0" autoincrement="1">
42 <datatype>INTEGER</datatype>
43 <relation table="app_permission" row="app_id" />
44 <relation table="app_path" row="app_id" />
45 </row>
46 <row name="label_id" null="0" autoincrement="0">
47 <datatype>INTEGER</datatype>
48 </row>
49 <key type="PRIMARY" name="">
50 <part>app_id</part>
51 </key>
52 <key type="UNIQUE" name="">
53 <part>label_id</part>
54 </key>
55 </table>
56 <table x="241" y="43" name="app_permission">
57 <row name="app_id" null="0" autoincrement="0">
58 <datatype>INTEGER</datatype>
59 </row>
60 <row name="permission_id" null="0" autoincrement="0">
61 <datatype>INTEGER</datatype>
62 </row>
63 <row name="is_volatile" null="0" autoincrement="0">
64 <datatype>INTEGER</datatype>
65 <default>0</default></row>
66 <row name="is_enabled" null="0" autoincrement="0">
67 <datatype>INTEGER</datatype>
68 <default>1</default></row>
69 <key type="PRIMARY" name="">
70 <part>app_id</part>
71 <part>permission_id</part>
72 </key>
73 </table>
74 <table x="215" y="490" name="app_path">
75 <row name="app_id" null="0" autoincrement="0">
76 <datatype>INTEGER</datatype>
77 </row>
78 <row name="path" null="0" autoincrement="0">
79 <datatype>MEDIUMTEXT</datatype>
80 </row>
81 <row name="label_id" null="0" autoincrement="0">
82 <datatype>INTEGER</datatype>
83 </row>
84 <row name="access" null="0" autoincrement="0">
85 <datatype>INTEGER(1)</datatype>
86 </row>
87 <row name="access_reverse" null="0" autoincrement="0">
88 <datatype>INTEGER(1)</datatype>
89 </row>
90 <row name="app_path_type_id" null="0" autoincrement="0">
91 <datatype>INTEGER</datatype>
92 </row>
93 <key type="PRIMARY" name="">
94 <part>app_id</part>
95 <part>path</part>
96 </key>
97 </table>
98 <table x="450" y="577" name="app_path_type">
99 <row name="app_path_type_id" null="0" autoincrement="1">
100 <datatype>INTEGER</datatype>
101 <relation table="app_path" row="app_path_type_id" />
102 <relation table="permission_app_path_type_rule" row="app_path_type_id" />
103 <relation table="label_app_path_type_rule" row="app_path_type_id" />
104 </row>
105 <row name="name" null="0" autoincrement="0">
106 <datatype>MEDIUMTEXT</datatype>
107 </row>
108 <key type="PRIMARY" name="">
109 <part>app_path_type_id</part>
110 </key>
111 <key type="UNIQUE" name="">
112 <part>name</part>
113 </key>
114 </table>
115 <table x="472" y="457" name="label">
116 <row name="label_id" null="0" autoincrement="1">
117 <datatype>INTEGER</datatype>
118 <relation table="app" row="label_id" />
119 <relation table="app_path" row="label_id" />
120 <relation table="permission_label_rule" row="label_id" />
121 </row>
122 <row name="name" null="0" autoincrement="0">
123 <datatype>MEDIUMTEXT</datatype>
124 </row>
125 <key type="PRIMARY" name="">
126 <part>label_id</part>
127 </key>
128 <key type="UNIQUE" name="">
129 <part>name</part>
130 </key>
131 </table>
132 <table x="510" y="182" name="permission_type">
133 <row name="permission_type_id" null="0" autoincrement="1">
134 <datatype>INTEGER</datatype>
135 <relation table="permission" row="permission_type_id" />
136 </row>
137 <row name="type_name" null="0" autoincrement="0">
138 <datatype>MEDIUMTEXT</datatype>
139 </row>
140 <key type="PRIMARY" name="">
141 <part>permission_type_id</part>
142 </key>
143 <key type="UNIQUE" name="">
144 <part>type_name</part>
145 </key>
146 </table>
147 <table x="517" y="65" name="permission">
148 <row name="permission_id" null="0" autoincrement="1">
149 <datatype>INTEGER</datatype>
150 <relation table="app_permission" row="permission_id" />
151 <relation table="permission_permission_rule" row="permission_id" />
152 <relation table="permission_permission_rule" row="target_permission_id" />
153 <relation table="permission_label_rule" row="permission_id" />
154 <relation table="permission_app_path_type_rule" row="permission_id" />
155 </row>
156 <row name="permission_type_id" null="0" autoincrement="0">
157 <datatype>INTEGER</datatype>
158 </row>
159 <row name="name" null="0" autoincrement="0">
160 <datatype>MEDIUMTEXT</datatype>
161 </row>
162 <key type="PRIMARY" name="">
163 <part>permission_id</part>
164 </key>
165 <key type="UNIQUE" name="">
166 <part>permission_type_id</part>
167 <part>name</part>
168 </key>
169 </table>
170 <table x="855" y="133" name="permission_permission_rule">
171 <row name="permission_id" null="0" autoincrement="1">
172 <datatype>INTEGER</datatype>
173 </row>
174 <row name="target_permission_id" null="1" autoincrement="0">
175 <datatype>TINYINT</datatype>
176 <default>NULL</default></row>
177 <row name="access" null="0" autoincrement="0">
178 <datatype>INTEGER(1)</datatype>
179 <default>0</default></row>
180 <row name="is_reverse" null="1" autoincrement="0">
181 <datatype>INTEGER</datatype>
182 <default>NULL</default></row>
183 <key type="PRIMARY" name="">
184 <part>permission_id</part>
185 <part>target_permission_id</part>
186 <part>is_reverse</part>
187 </key>
188 </table>
189 <table x="852" y="300" name="permission_label_rule">
190 <row name="permission_id" null="0" autoincrement="0">
191 <datatype>INTEGER</datatype>
192 </row>
193 <row name="label_id" null="1" autoincrement="0">
194 <datatype>TINYINT</datatype>
195 <default>NULL</default></row>
196 <row name="access" null="0" autoincrement="0">
197 <datatype>INTEGER(1)</datatype>
198 <default>0</default></row>
199 <row name="is_reverse" null="0" autoincrement="0">
200 <datatype>INTEGER(1)</datatype>
201 <default>0</default></row>
202 <key type="PRIMARY" name="">
203 <part>permission_id</part>
204 <part>label_id</part>
205 <part>is_reverse</part>
206 </key>
207 </table>
208 <table x="849" y="477" name="permission_app_path_type_rule">
209 <row name="permission_id" null="0" autoincrement="0">
210 <datatype>INTEGER</datatype>
211 </row>
212 <row name="app_path_type_id" null="0" autoincrement="0">
213 <datatype>INTEGER</datatype>
214 </row>
215 <row name="access" null="0" autoincrement="0">
216 <datatype>INTEGER(1)</datatype>
217 <default>0</default></row>
218 <row name="is_reverse" null="0" autoincrement="0">
219 <datatype>INTEGER(1)</datatype>
220 <default>0</default></row>
221 <key type="PRIMARY" name="">
222 <part>permission_id</part>
223 <part>app_path_type_id</part>
224 <part>is_reverse</part>
225 </key>
226 </table>
227 <table x="849" y="620" name="label_app_path_type_rule">
228 <row name="label_id" null="0" autoincrement="0">
229 <datatype>INTEGER</datatype>
230 <relation table="label" row="label_id" />
231 </row>
232 <row name="app_path_type_id" null="0" autoincrement="0">
233 <datatype>INTEGER</datatype>
234 </row>
235 <row name="access" null="0" autoincrement="0">
236 <datatype>INTEGER</datatype>
237 <default>0</default></row>
238 <row name="is_reverse" null="1" autoincrement="0">
239 <datatype>TINYINT</datatype>
240 <default>NULL</default></row>
241 <key type="PRIMARY" name="">
242 <part>label_id</part>
243 <part>app_path_type_id</part>
244 <part>is_reverse</part>
245 </key>
246 </table>
247 </sql>