92cd64cccb1e2892d716ceeb52af4626a07d175d
[tine20] / tine20 / ActiveSync / Setup / setup.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <application>
3     <name>ActiveSync</name>
4     <version>8.0</version>
5     <order>90</order>
6     <depends>
7         <application>Tinebase</application>
8     </depends>
9     <tables>
10         <table>
11             <name>acsync_policy</name>
12             <version>3</version>
13             <declaration>
14                 <field>
15                     <name>id</name>
16                     <type>text</type>
17                     <length>40</length>
18                     <notnull>true</notnull>
19                 </field>
20                 <field>
21                     <name>name</name>
22                     <type>text</type>
23                     <length>64</length>
24                     <notnull>true</notnull>
25                 </field>
26                 <field>
27                     <name>description</name>
28                     <type>text</type>
29                     <length>255</length>
30                 </field>
31                 <field>
32                     <name>policy_key</name>
33                     <type>text</type>
34                     <length>64</length>
35                     <notnull>true</notnull>
36                 </field>
37                 <field>
38                     <name>json_policy</name>
39                     <type>blob</type>
40                 </field>
41                 <index>
42                     <name>id</name>
43                     <primary>true</primary>
44                     <unique>true</unique>
45                     <field>
46                         <name>id</name>
47                     </field>
48                 </index>
49             </declaration>
50         </table>
51         <table>
52             <name>acsync_device</name>
53             <version>6</version>
54             <declaration>
55                 <field>
56                     <name>id</name>
57                     <type>text</type>
58                     <length>40</length>
59                     <notnull>true</notnull>
60                 </field>
61                 <field>
62                     <name>deviceid</name>
63                     <type>text</type>
64                     <length>64</length>
65                     <notnull>true</notnull>
66                 </field>
67                 <field>
68                     <name>devicetype</name>
69                     <type>text</type>
70                     <length>64</length>
71                     <notnull>true</notnull>
72                 </field>
73                 <field>
74                     <name>policykey</name>
75                     <type>text</type>
76                     <length>64</length>
77                     <notnull>false</notnull>
78                 </field>
79                 <field>
80                     <name>owner_id</name>
81                         <type>text</type>
82                         <length>40</length>
83                     <notnull>false</notnull>
84                 </field>
85                 <field>
86                     <name>acsversion</name>
87                     <type>text</type>
88                     <length>40</length>
89                     <notnull>true</notnull>
90                 </field>
91                 <field>
92                     <name>useragent</name>
93                     <type>text</type>
94                     <length>255</length>
95                     <notnull>true</notnull>
96                 </field>
97                 <field>
98                     <name>policy_id</name>
99                     <type>text</type>
100                     <length>40</length>
101                 </field>
102                 <field>
103                     <name>pinglifetime</name>
104                     <type>integer</type>
105                     <notnull>false</notnull>
106                 </field>
107                 <field>
108                     <name>remotewipe</name>
109                     <type>integer</type>
110                     <default>0</default>
111                 </field>
112                 <field>
113                     <name>pingfolder</name>
114                     <type>blob</type>
115                 </field>
116                 <field>
117                     <name>model</name>
118                     <type>text</type>
119                     <length>255</length>
120                     <notnull>false</notnull>
121                 </field>
122                 <field>
123                     <name>imei</name>
124                     <type>text</type>
125                     <length>64</length>
126                     <notnull>false</notnull>
127                 </field>
128                 <field>
129                     <name>friendlyname</name>
130                     <type>text</type>
131                     <length>255</length>
132                     <notnull>false</notnull>
133                 </field>
134                 <field>
135                     <name>os</name>
136                     <type>text</type>
137                     <length>255</length>
138                     <notnull>false</notnull>
139                 </field>
140                 <field>
141                     <name>oslanguage</name>
142                     <type>text</type>
143                     <length>128</length>
144                     <notnull>false</notnull>
145                 </field>
146                 <field>
147                     <name>phonenumber</name>
148                     <type>text</type>
149                     <length>64</length>
150                     <notnull>false</notnull>
151                 </field>
152                 <field>
153                     <name>contactsfilter_id</name>
154                     <type>text</type>
155                     <length>40</length>
156                     <notnull>false</notnull>
157                 </field>
158                 <field>
159                     <name>calendarfilter_id</name>
160                     <type>text</type>
161                     <length>40</length>
162                     <notnull>false</notnull>
163                 </field>
164                 <field>
165                     <name>tasksfilter_id</name>
166                     <type>text</type>
167                     <length>40</length>
168                     <notnull>false</notnull>
169                 </field>
170                 <field>
171                     <name>emailfilter_id</name>
172                     <type>text</type>
173                     <length>40</length>
174                     <notnull>false</notnull>
175                 </field>
176                 <field>
177                     <name>lastsynccollection</name>
178                     <type>blob</type>
179                     <default>null</default>
180                 </field>
181                 <field>
182                     <name>lastping</name>
183                     <type>datetime</type>
184                 </field>
185                 <index>
186                     <name>id</name>
187                     <primary>true</primary>
188                     <unique>true</unique>
189                     <field>
190                         <name>id</name>
191                     </field>
192                 </index>
193                 <index>
194                     <name>acsync_device::policy_id--acsync_policy::id</name>
195                     <field>
196                         <name>policy_id</name>
197                     </field>
198                     <foreign>true</foreign>
199                     <reference>
200                         <table>acsync_policy</table>
201                         <field>id</field>
202                         <onupdate>cascade</onupdate>
203                     </reference>
204                 </index>
205                 <index>
206                     <name>acsync_device::calendarfilter_id--filter::id</name>
207                     <field>
208                         <name>calendarfilter_id</name>
209                     </field>
210                     <foreign>true</foreign>
211                     <reference>
212                         <table>filter</table>
213                         <field>id</field>
214                         <ondelete>set null</ondelete>
215                         <onupdate>cascade</onupdate>
216                     </reference>
217                 </index>
218                 <index>
219                     <name>acsync_device::contactsfilter_id--filter::id</name>
220                     <field>
221                         <name>contactsfilter_id</name>
222                     </field>
223                     <foreign>true</foreign>
224                     <reference>
225                         <table>filter</table>
226                         <field>id</field>
227                         <ondelete>set null</ondelete>
228                         <onupdate>cascade</onupdate>
229                     </reference>
230                 </index>
231                 <index>
232                     <name>acsync_device::emailfilter_id--filter::id</name>
233                     <field>
234                         <name>emailfilter_id</name>
235                     </field>
236                     <foreign>true</foreign>
237                     <reference>
238                         <table>filter</table>
239                         <field>id</field>
240                         <ondelete>set null</ondelete>
241                         <onupdate>cascade</onupdate>
242                     </reference>
243                 </index>
244                 <index>
245                     <name>acsync_device::tasksfilter_id--filter::id</name>
246                     <field>
247                         <name>tasksfilter_id</name>
248                     </field>
249                     <foreign>true</foreign>
250                     <reference>
251                         <table>filter</table>
252                         <field>id</field>
253                         <ondelete>set null</ondelete>
254                         <onupdate>cascade</onupdate>
255                     </reference>
256                 </index>
257                 <index>
258                     <name>deviceid--owner_id</name>
259                     <unique>true</unique>
260                     <length>40</length>
261                     <field>
262                         <name>deviceid</name>
263                     </field>
264                     <field>
265                         <name>owner_id</name>
266                     </field>
267                 </index>
268             </declaration>
269         </table>
270         <table>
271             <name>acsync_synckey</name>
272             <engine>InnoDB</engine>
273             <charset>utf8</charset>
274             <version>4</version>
275             <declaration>
276                 <field>
277                     <name>id</name>
278                     <type>text</type>
279                     <length>40</length>
280                     <notnull>true</notnull>
281                 </field>
282                 <field>
283                     <name>device_id</name>
284                     <type>text</type>
285                     <length>64</length>
286                     <notnull>false</notnull>
287                 </field>
288                 <field>
289                     <name>type</name>
290                     <type>text</type>
291                     <length>64</length>
292                     <notnull>false</notnull>
293                 </field>
294                 <field>
295                     <name>counter</name>
296                     <type>integer</type>
297                     <notnull>false</notnull>
298                 </field>
299                 <field>
300                     <name>lastsync</name>
301                     <type>datetime</type>
302                 </field>
303                 <field>
304                     <name>pendingdata</name>
305                     <type>blob</type>
306                 </field>
307                 <index>
308                     <name>device_id--type--counter</name>
309                     <primary>true</primary>
310                     <field>
311                         <name>device_id</name>
312                     </field>
313                     <field>
314                         <name>type</name>
315                     </field>
316                     <field>
317                         <name>counter</name>
318                     </field>
319                 </index>
320                 <index>
321                     <name>acsync_synckey::device_id--acsync_device::id</name>
322                     <field>
323                         <name>device_id</name>
324                     </field>
325                     <foreign>true</foreign>
326                     <reference>
327                         <table>acsync_device</table>
328                         <field>id</field>
329                         <ondelete>cascade</ondelete>
330                         <onupdate>cascade</onupdate>
331                     </reference>
332                 </index>
333                 <index>
334                     <name>id</name>
335                     <unique>true</unique>
336                     <field>
337                         <name>id</name>
338                     </field>
339                 </index>
340             </declaration>
341         </table>
342         <table>
343             <name>acsync_folder</name>
344             <engine>InnoDB</engine>
345             <charset>utf8</charset>
346             <version>3</version>
347             <declaration>
348                 <field>
349                     <name>id</name>
350                     <type>text</type>
351                     <length>40</length>
352                     <notnull>true</notnull>
353                 </field>
354                 <field>
355                     <name>device_id</name>
356                     <type>text</type>
357                     <length>64</length>
358                     <notnull>true</notnull>
359                 </field>
360                 <field>
361                     <name>class</name>
362                     <type>text</type>
363                     <length>64</length>
364                     <notnull>true</notnull>
365                 </field>
366                 <field>
367                     <name>folderid</name>
368                     <type>text</type>
369                     <length>254</length>
370                     <notnull>true</notnull>
371                 </field>
372                 <field>
373                     <name>creation_time</name>
374                     <type>datetime</type>
375                     <notnull>true</notnull>
376                 </field>
377                 <field>
378                     <name>lastfiltertype</name>
379                     <type>integer</type>
380                     <notnull>false</notnull>
381                 </field>
382                 <field>
383                     <name>parentid</name>
384                     <type>text</type>
385                     <length>254</length>
386                 </field>
387                 <field>
388                     <name>displayname</name>
389                     <type>text</type>
390                     <length>254</length>
391                     <notnull>true</notnull>
392                 </field>
393                 <field>
394                     <name>type</name>
395                     <type>integer</type>
396                     <notnull>true</notnull>
397                 </field>
398                 <field>
399                     <name>supportedfields</name>
400                     <type>blob</type>
401                     <default>null</default>
402                 </field>
403                 <index>
404                     <name>id</name>
405                     <primary>true</primary>
406                     <field>
407                         <name>id</name>
408                     </field>
409                 </index>
410                 <index>
411                     <name>device_id--class--folderid</name>
412                     <unique>true</unique>
413                     <length>40</length>
414                     <field>
415                         <name>device_id</name>
416                     </field>
417                     <field>
418                         <name>class</name>
419                     </field>
420                     <field>
421                         <name>folderid</name>
422                     </field>
423                 </index>
424                 <index>
425                     <name>acsync_folder::device_id--acsync_device::id</name>
426                     <field>
427                         <name>device_id</name>
428                     </field>
429                     <foreign>true</foreign>
430                     <reference>
431                         <table>acsync_device</table>
432                         <field>id</field>
433                         <ondelete>cascade</ondelete>
434                         <onupdate>cascade</onupdate>
435                     </reference>
436                 </index>
437             </declaration>
438         </table>
439         <table>
440             <name>acsync_content</name>
441             <engine>InnoDB</engine>
442             <charset>utf8</charset>
443             <version>5</version>
444             <declaration>
445                 <field>
446                     <name>id</name>
447                     <type>text</type>
448                     <length>40</length>
449                     <notnull>true</notnull>
450                 </field>
451                 <field>
452                     <name>device_id</name>
453                     <type>text</type>
454                     <length>40</length>
455                     <notnull>true</notnull>
456                 </field>
457                 <field>
458                     <name>folder_id</name>
459                     <type>text</type>
460                     <length>40</length>
461                     <notnull>true</notnull>
462                 </field>
463                 <field>
464                     <name>contentid</name>
465                     <type>text</type>
466                     <length>64</length>
467                     <notnull>true</notnull>
468                 </field>
469                 <field>
470                     <name>creation_time</name>
471                     <type>datetime</type>
472                     <notnull>true</notnull>
473                 </field>
474                 <field>
475                     <name>is_deleted</name>
476                     <type>boolean</type>
477                     <default>false</default>
478                 </field>
479                 <field>
480                     <name>creation_synckey</name>
481                     <type>integer</type>
482                     <notnull>true</notnull>
483                 </field>
484                 <index>
485                     <name>id</name>
486                     <primary>true</primary>
487                     <field>
488                         <name>id</name>
489                     </field>
490                 </index>
491                 <index>
492                     <name>device_id--folder_id--contentid</name>
493                     <unique>true</unique>
494                     <length>40</length>
495                     <field>
496                         <name>device_id</name>
497                     </field>
498                     <field>
499                         <name>folder_id</name>
500                     </field>
501                     <field>
502                         <name>contentid</name>
503                     </field>
504                 </index>
505                 <index>
506                     <name>acsync_content::device_id--acsync_device::id</name>
507                     <field>
508                         <name>device_id</name>
509                     </field>
510                     <foreign>true</foreign>
511                     <reference>
512                         <table>acsync_device</table>
513                         <field>id</field>
514                         <ondelete>cascade</ondelete>
515                         <onupdate>cascade</onupdate>
516                     </reference>
517                 </index>
518                 <index>
519                     <name>acsync_content::folder_id--acsync_folder::id</name>
520                     <field>
521                         <name>folder_id</name>
522                     </field>
523                     <foreign>true</foreign>
524                     <reference>
525                         <table>acsync_folder</table>
526                         <field>id</field>
527                         <ondelete>cascade</ondelete>
528                         <onupdate>cascade</onupdate>
529                     </reference>
530                 </index>
531             </declaration>
532         </table>
533     </tables>
534     <defaultRecords>
535         <record>
536             <table>
537                 <name>acsync_policy</name>
538             </table>
539             <field>
540                 <name>id</name>
541                 <value special='uid'/>
542             </field>
543             <field>
544                 <name>name</name>
545                 <value>Default Policy</value>
546                 <!-- gettext('Default Policy') -->
547             </field>
548             <field>
549                 <name>description</name>
550                 <value>Default Policy installed during setup</value>
551                 <!-- gettext('Default Policy installed during setup') -->
552             </field>
553             <field>
554                 <name>policy_key</name>
555                 <value special='uid'/>
556             </field>
557             <field>
558                 <name>json_policy</name>
559                 <value>{"DevicePasswordEnabled":"1"}</value>
560             </field>
561         </record>
562     </defaultRecords>
563 </application>