Tinebase_Export - update script to import to vfs
[tine20] / tine20 / Tinebase / Setup / setup.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <application>
3     <name>Tinebase</name>
4     <version>10.29</version>
5     <tables>
6         <table>
7             <name>applications</name>
8             <version>4</version>
9             <declaration>
10                 <field>
11                     <name>id</name>
12                     <type>text</type>
13                     <length>40</length>
14                     <notnull>true</notnull>
15                 </field>
16                 <field>
17                     <name>name</name>
18                     <type>text</type>
19                     <length>25</length>
20                     <notnull>true</notnull>
21                 </field>
22                 <field>
23                     <name>status</name>
24                     <type>text</type>
25                     <length>32</length>
26                     <default>enabled</default>
27                     <notnull>true</notnull>
28                 </field>
29                 <field>
30                     <name>order</name>
31                     <type>integer</type>
32                     <notnull>true</notnull>
33                 </field>
34                 <field>
35                     <name>version</name>
36                     <type>text</type>
37                     <length>20</length>
38                     <notnull>true</notnull>
39                 </field>
40                 <field>
41                     <name>state</name>
42                     <type>text</type>
43                     <length>65535</length>
44                     <notnull>false</notnull>
45                 </field>
46                 <index>
47                     <name>id</name>
48                     <primary>true</primary>
49                     <field>
50                         <name>id</name>
51                     </field>
52                 </index>
53                 <index>
54                     <name>name</name>
55                     <unique>true</unique>
56                     <field>
57                         <name>name</name>
58                     </field>
59                 </index>
60                 <index>
61                     <name>status</name>
62                     <field>
63                         <name>status</name>
64                     </field>
65                 </index>
66             </declaration>
67         </table>
68
69         <table>
70             <name>application_tables</name>
71             <version>1</version>
72             <declaration>
73                 <field>
74                     <name>application_id</name>
75                     <type>text</type>
76                     <length>40</length>
77                     <notnull>true</notnull>
78                 </field>
79                 <field>
80                     <name>name</name>
81                     <type>text</type>
82                     <length>128</length>
83                     <notnull>true</notnull>
84                 </field>
85                 <field>
86                     <name>version</name>
87                     <type>text</type>
88                     <length>20</length>
89                     <notnull>true</notnull>
90                 </field>
91                 <index>
92                     <name>name-application_id</name>
93                     <primary>true</primary>
94                     <field>
95                         <name>application_id</name>
96                     </field>
97                     <field>
98                         <name>name</name>
99                     </field>
100                 </index>
101                 <index>
102                     <name>application_tables::application_id--applications::id</name>
103                     <field>
104                         <name>application_id</name>
105                     </field>
106                     <foreign>true</foreign>
107                     <reference>
108                         <table>applications</table>
109                         <field>id</field>
110                         <ondelete>cascade</ondelete>
111                         <!-- add onupdate? -->
112                     </reference>
113                 </index>
114             </declaration>
115         </table>
116
117         <!-- credential_cache -->
118         <table>
119             <name>credential_cache</name>
120             <version>1</version>
121             <declaration>
122                 <field>
123                     <name>id</name>
124                     <type>text</type>
125                     <length>40</length>
126                     <notnull>true</notnull>
127                 </field>
128                 <field>
129                     <name>cache</name>
130                     <type>clob</type>
131                     <notnull>true</notnull>
132                 </field>
133                 <field>
134                     <name>creation_time</name>
135                     <type>datetime</type>
136                 </field>
137                 <field>
138                     <name>valid_until</name>
139                     <type>datetime</type>
140                 </field>
141                 <index>
142                     <name>id</name>
143                     <primary>true</primary>
144                     <field>
145                         <name>id</name>
146                     </field>
147                 </index>
148             </declaration>
149         </table>
150
151         <table>
152             <name>groups</name>
153             <version>6</version>
154             <declaration>
155                 <field>
156                     <name>id</name>
157                     <type>text</type>
158                     <length>40</length>
159                     <notnull>true</notnull>
160                 </field>
161                 <field>
162                     <name>name</name>
163                     <type>text</type>
164                     <length>128</length>
165                     <notnull>true</notnull>
166                 </field>
167                 <field>
168                     <name>description</name>
169                     <type>text</type>
170                     <notnull>false</notnull>
171                 </field>
172                 <field>
173                     <name>visibility</name>
174                     <type>text</type>
175                     <length>32</length>
176                     <default>displayed</default>
177                     <notnull>true</notnull>
178                 </field>
179                 <field>
180                     <name>email</name>
181                     <type>text</type>
182                     <length>64</length>
183                 </field>
184                 <field>
185                     <name>list_id</name>
186                     <type>text</type>
187                     <length>40</length>
188                 </field>
189                 <field>
190                     <name>created_by</name>
191                     <type>text</type>
192                     <length>40</length>
193                 </field>
194                 <field>
195                     <name>creation_time</name>
196                     <type>datetime</type>
197                 </field>
198                 <field>
199                     <name>last_modified_by</name>
200                     <type>text</type>
201                     <length>40</length>
202                 </field>
203                 <field>
204                     <name>last_modified_time</name>
205                     <type>datetime</type>
206                 </field>
207                 <field>
208                     <name>is_deleted</name>
209                     <type>boolean</type>
210                     <default>false</default>
211                 </field>
212                 <field>
213                     <name>deleted_by</name>
214                     <type>text</type>
215                     <length>40</length>
216                 </field>
217                 <field>
218                     <name>deleted_time</name>
219                     <type>datetime</type>
220                 </field>
221                 <field>
222                     <name>seq</name>
223                     <type>integer</type>
224                     <notnull>true</notnull>
225                     <default>0</default>
226                 </field>
227                 <index>
228                     <name>id</name>
229                     <primary>true</primary>
230                     <field>
231                         <name>id</name>
232                     </field>
233                 </index>
234                 <index>
235                     <name>name</name>
236                     <unique>true</unique>
237                     <field>
238                         <name>name</name>
239                     </field>
240                 </index>
241                 <index>
242                     <name>list_id</name>
243                     <field>
244                         <name>list_id</name>
245                     </field>
246                 </index>
247             </declaration>
248         </table>
249
250         <table>
251             <name>accounts</name>
252             <version>11</version>
253             <declaration>
254                 <field>
255                     <name>id</name>
256                     <type>text</type>
257                     <length>40</length>
258                     <notnull>true</notnull>
259                 </field>
260                 <field>
261                     <name>login_name</name>
262                     <type>text</type>
263                     <length>255</length>
264                     <notnull>true</notnull>
265                 </field>
266                 <field>
267                     <name>password</name>
268                     <type>text</type>
269                     <length>100</length>
270                     <notnull>false</notnull>
271                 </field>
272                 <field>
273                     <name>login_shell</name>
274                     <type>text</type>
275                     <length>100</length>
276                     <notnull>false</notnull>
277                 </field>
278                 <field>
279                     <name>home_dir</name>
280                     <type>text</type>
281                     <length>255</length>
282                     <notnull>false</notnull>
283                 </field>
284                 <field>
285                     <name>last_login</name>
286                     <type>datetime</type>
287                 </field>
288                 <field>
289                     <name>last_login_from</name>
290                     <type>text</type>
291                     <length>39</length>
292                     <notnull>false</notnull>
293                 </field>
294                 <field>
295                     <name>last_password_change</name>
296                     <type>datetime</type>
297                 </field>
298                 <field>
299                     <name>status</name>
300                     <type>text</type>
301                     <length>20</length>
302                     <default>enabled</default>
303                     <notnull>true</notnull>
304                 </field>
305                 <field>
306                     <name>expires_at</name>
307                     <type>datetime</type>
308                 </field>
309                 <field>
310                     <name>blocked_until</name>
311                     <type>datetime</type>
312                 </field>
313                 <field>
314                     <name>login_failures</name>
315                     <type>integer</type>
316                     <default>0</default>
317                 </field>
318                 <field>
319                     <name>last_login_failure_at</name>
320                     <type>datetime</type>
321                 </field>
322                 <field>
323                     <name>primary_group_id</name>
324                     <type>text</type>
325                     <length>40</length>
326                     <notnull>true</notnull>
327                 </field>
328                 <field>
329                     <name>openid</name>
330                     <type>text</type>
331                     <length>254</length>
332                 </field>
333                 <field>
334                     <name>visibility</name>
335                     <type>text</type>
336                     <length>32</length>
337                     <default>displayed</default>
338                     <notnull>true</notnull>
339                 </field>
340                 <field>
341                     <name>email</name>
342                     <type>text</type>
343                     <length>255</length>
344                 </field>
345                 <field>
346                     <name>first_name</name>
347                     <type>text</type>
348                     <length>255</length>
349                 </field>
350                 <field>
351                     <name>last_name</name>
352                     <type>text</type>
353                     <length>255</length>
354                     <notnull>true</notnull>
355                 </field>
356                 <field>
357                     <name>full_name</name>
358                     <type>text</type>
359                     <length>255</length>
360                     <notnull>true</notnull>
361                 </field>
362                 <field>
363                     <name>display_name</name>
364                     <type>text</type>
365                     <length>255</length>
366                     <notnull>true</notnull>
367                 </field>
368                 <field>
369                     <name>contact_id</name>
370                     <type>text</type>
371                     <length>40</length>
372                 </field>
373                 <field>
374                     <name>created_by</name>
375                     <type>text</type>
376                     <length>40</length>
377                 </field>
378                 <field>
379                     <name>creation_time</name>
380                     <type>datetime</type>
381                 </field>
382                 <field>
383                     <name>last_modified_by</name>
384                     <type>text</type>
385                     <length>40</length>
386                 </field>
387                 <field>
388                     <name>last_modified_time</name>
389                     <type>datetime</type>
390                 </field>
391                 <field>
392                     <name>is_deleted</name>
393                     <type>boolean</type>
394                     <default>false</default>
395                 </field>
396                 <field>
397                     <name>deleted_by</name>
398                     <type>text</type>
399                     <length>40</length>
400                 </field>
401                 <field>
402                     <name>deleted_time</name>
403                     <type>datetime</type>
404                 </field>
405                 <field>
406                     <name>seq</name>
407                     <type>integer</type>
408                     <notnull>true</notnull>
409                     <default>0</default>
410                 </field>
411                 <index>
412                     <name>id</name>
413                     <primary>true</primary>
414                     <field>
415                         <name>id</name>
416                     </field>
417                 </index>
418                 <index>
419                     <name>login_name</name>
420                     <unique>true</unique>
421                     <field>
422                         <name>login_name</name>
423                     </field>
424                 </index>
425                 <index>
426                     <name>openid</name>
427                     <unique>true</unique>
428                     <field>
429                         <name>openid</name>
430                     </field>
431                 </index>
432                 <index>
433                     <name>visibility</name>
434                     <field>
435                         <name>visibility</name>
436                     </field>
437                 </index>
438                 <index>
439                     <name>primary_group_id</name>
440                     <field>
441                         <name>primary_group_id</name>
442                     </field>
443                 </index>
444                 <index>
445                     <name>contact_id</name>
446                     <field>
447                         <name>contact_id</name>
448                     </field>
449                 </index>
450                 <index>
451                     <name>accounts::primary_group_id--groups::id</name>
452                     <field>
453                         <name>primary_group_id</name>
454                     </field>
455                     <foreign>true</foreign>
456                     <reference>
457                         <table>groups</table>
458                         <field>id</field>
459                     </reference>
460                 </index>
461             </declaration>
462         </table>
463
464         <table>
465             <name>group_members</name>
466             <version>1</version>
467             <declaration>
468                 <field>
469                     <name>group_id</name>
470                     <type>text</type>
471                     <length>40</length>
472                     <notnull>true</notnull>
473                 </field>
474                 <field>
475                     <name>account_id</name>
476                     <type>text</type>
477                     <length>40</length>
478                     <notnull>true</notnull>
479                 </field>
480
481                 <index>
482                     <name>group_id-account_id</name>
483                     <primary>true</primary>
484                     <field>
485                         <name>group_id</name>
486                     </field>
487                     <field>
488                         <name>account_id</name>
489                     </field>
490                 </index>
491                 <index>
492                     <name>account_id</name>
493                     <field>
494                         <name>account_id</name>
495                     </field>
496                 </index>
497                 <index>
498                     <name>group_members::account_id--accounts::id</name>
499                     <field>
500                         <name>account_id</name>
501                     </field>
502                     <foreign>true</foreign>
503                     <reference>
504                         <table>accounts</table>
505                         <field>id</field>
506                     </reference>
507                 </index>
508                 <index>
509                     <name>group_members::group_id--groups::id</name>
510                     <field>
511                         <name>group_id</name>
512                     </field>
513                     <foreign>true</foreign>
514                     <reference>
515                         <table>groups</table>
516                         <field>id</field>
517                     </reference>
518                 </index>
519             </declaration>
520         </table>
521         <table>
522             <name>container</name>
523             <version>12</version>
524             <declaration>
525                 <field>
526                     <name>id</name>
527                     <type>integer</type>
528                     <autoincrement>true</autoincrement>
529                 </field>
530                 <field>
531                     <name>name</name>
532                     <type>text</type>
533                     <length>255</length>
534                     <notnull>true</notnull>
535                 </field>
536                 <field>
537                     <name>type</name>
538                     <type>text</type>
539                     <length>32</length>
540                     <default>personal</default>
541                     <notnull>false</notnull>
542                 </field>
543                 <field>
544                     <name>owner_id</name>
545                     <type>text</type>
546                     <length>40</length>
547                     <notnull>false</notnull>
548                 </field>
549                 <field>
550                     <name>color</name>
551                     <type>text</type>
552                     <length>7</length>
553                     <default>NULL</default>
554                 </field>
555                 <field>
556                     <name>order</name>
557                     <type>integer</type>
558                     <default>0</default>
559                     <notnull>false</notnull>
560                 </field>
561                 <field>
562                     <name>backend</name>
563                     <type>text</type>
564                     <length>64</length>
565                     <notnull>true</notnull>
566                 </field>
567                 <field>
568                     <name>application_id</name>
569                     <type>text</type>
570                     <length>40</length>
571                     <notnull>true</notnull>
572                 </field>
573                 <field>
574                     <name>content_seq</name>
575                     <type>integer</type>
576                     <length>64</length>
577                 </field>
578                 <field>
579                     <name>created_by</name>
580                     <type>text</type>
581                     <length>40</length>
582                 </field>
583                 <field>
584                     <name>creation_time</name>
585                     <type>datetime</type>
586                 </field>
587                 <field>
588                     <name>last_modified_by</name>
589                     <type>text</type>
590                     <length>40</length>
591                 </field>
592                 <field>
593                     <name>last_modified_time</name>
594                     <type>datetime</type>
595                 </field>
596                 <field>
597                     <name>is_deleted</name>
598                     <type>boolean</type>
599                     <default>false</default>
600                 </field>
601                 <field>
602                     <name>deleted_by</name>
603                     <type>text</type>
604                     <length>40</length>
605                 </field>
606                 <field>
607                     <name>deleted_time</name>
608                     <type>datetime</type>
609                 </field>
610                 <field>
611                     <name>seq</name>
612                     <type>integer</type>
613                     <notnull>true</notnull>
614                     <default>0</default>
615                 </field>
616                 <field>
617                     <name>model</name>
618                     <type>text</type>
619                     <length>64</length>
620                 </field>
621                 <field>
622                     <name>uuid</name>
623                     <type>text</type>
624                     <length>64</length>
625                     <default>NULL</default>
626                 </field>
627                 <field>
628                     <name>xprops</name>
629                     <type>text</type>
630                     <notnull>false</notnull>
631                     <default>NULL</default>
632                 </field>
633                 <index>
634                     <name>id</name>
635                     <primary>true</primary>
636                     <field>
637                         <name>id</name>
638                     </field>
639                 </index>
640                 <index>
641                     <name>type</name>
642                     <field>
643                         <name>type</name>
644                     </field>
645                 </index>
646                 <index>
647                     <name>application_id</name>
648                     <field>
649                         <name>application_id</name>
650                     </field>
651                 </index>
652                 <index>
653                     <name>owner_id</name>
654                     <field>
655                         <name>owner_id</name>
656                     </field>
657                 </index>
658                 <index>
659                     <name>container::application_id--applications::id</name>
660                     <field>
661                         <name>application_id</name>
662                     </field>
663                     <foreign>true</foreign>
664                     <reference>
665                         <table>applications</table>
666                         <field>id</field>
667                     </reference>
668                 </index>
669             </declaration>
670         </table>
671         <table>
672             <name>container_acl</name>
673             <version>3</version>
674             <declaration>
675                 <field>
676                     <name>id</name>
677                     <type>text</type>
678                     <length>40</length>
679                     <notnull>true</notnull>
680                 </field>
681                 <field>
682                     <name>container_id</name>
683                     <type>integer</type>
684                     <unsigned>true</unsigned>
685                     <notnull>true</notnull>
686                 </field>
687                 <field>
688                     <name>account_type</name>
689                     <type>text</type>
690                     <length>32</length>
691                     <default>user</default>
692                     <notnull>true</notnull>
693                 </field>
694                 <field>
695                     <name>account_id</name>
696                     <type>text</type>
697                     <length>40</length>
698                     <notnull>true</notnull>
699                 </field>
700                 <field>
701                     <name>account_grant</name>
702                     <type>text</type>
703                     <length>40</length>
704                     <notnull>true</notnull>
705                 </field>
706
707                 <index>
708                     <name>container_id-account-type-account_id-account_grant</name>
709                     <primary>true</primary>
710                     <field>
711                         <name>id</name>
712                     </field>
713                     <field>
714                         <name>container_id</name>
715                     </field>
716                     <field>
717                         <name>account_type</name>
718                     </field>
719                     <field>
720                         <name>account_id</name>
721                     </field>
722                     <field>
723                         <name>account_grant</name>
724                     </field>
725                 </index>
726                 <index>
727                     <name>id-account_type-account_id</name>
728                     <field>
729                         <name>container_id</name>
730                     </field>
731                     <field>
732                         <name>account_type</name>
733                     </field>
734                     <field>
735                         <name>account_id</name>
736                     </field>
737                 </index>
738                 <index>
739                     <name>container_acl::container_id--container::id</name>
740                     <field>
741                         <name>container_id</name>
742                     </field>
743                     <foreign>true</foreign>
744                     <reference>
745                         <table>container</table>
746                         <field>id</field>
747                         <ondelete>cascade</ondelete>
748                         <!-- add onupdate? -->
749                     </reference>
750                 </index>
751             </declaration>
752         </table>
753         <table>
754             <name>container_content</name>
755             <version>2</version>
756             <declaration>
757                 <field>
758                     <name>id</name>
759                     <type>text</type>
760                     <length>40</length>
761                     <notnull>true</notnull>
762                 </field>
763                 <field>
764                     <name>container_id</name>
765                     <type>integer</type>
766                     <unsigned>true</unsigned>
767                     <notnull>true</notnull>
768                 </field>
769                 <field>
770                     <name>record_id</name>
771                     <type>text</type>
772                     <length>40</length>
773                     <notnull>true</notnull>
774                 </field>
775                 <field>
776                     <name>action</name>
777                     <type>text</type>
778                     <length>16</length>
779                     <notnull>true</notnull>
780                 </field>
781                 <field>
782                     <name>content_seq</name>
783                     <type>integer</type>
784                     <length>64</length>
785                 </field>
786                 <field>
787                     <name>time</name>
788                     <type>datetime</type>
789                     <notnull>true</notnull>
790                 </field>
791                 <index>
792                     <name>container_id-content_seq-record_id</name>
793                     <primary>true</primary>
794                     <field>
795                         <name>container_id</name>
796                     </field>
797                     <field>
798                         <name>content_seq</name>
799                     </field>
800                     <field>
801                         <name>record_id</name>
802                     </field>
803                 </index>
804                 <index>
805                     <name>id</name>
806                     <field>
807                         <name>id</name>
808                     </field>
809                 </index>
810                 <index>
811                     <name>container_content::container_id--container::id</name>
812                     <field>
813                         <name>container_id</name>
814                     </field>
815                     <foreign>true</foreign>
816                     <reference>
817                         <table>container</table>
818                         <field>id</field>
819                         <ondelete>cascade</ondelete>
820                     </reference>
821                 </index>
822             </declaration>
823         </table>
824         <table>
825             <name>access_log</name>
826             <version>5</version>
827             <declaration>
828                 <field>
829                     <name>id</name>
830                     <type>text</type>
831                     <length>40</length>
832                     <notnull>true</notnull>
833                 </field>
834                 <field>
835                     <name>sessionid</name>
836                     <type>text</type>
837                     <length>128</length>
838                     <notnull>true</notnull>
839                 </field>
840                 <field>
841                     <name>login_name</name>
842                     <type>text</type>
843                     <length>64</length>
844                     <notnull>true</notnull>
845                 </field>
846                 <field>
847                     <name>ip</name>
848                     <type>text</type>
849                     <length>40</length>
850                     <notnull>false</notnull>
851                 </field>
852                 <field>
853                     <name>li</name>
854                     <type>datetime</type>
855                     <notnull>true</notnull>
856                 </field>
857                 <field>
858                     <name>lo</name>
859                     <type>datetime</type>
860                 </field>
861                 <field>
862                     <name>account_id</name>
863                     <type>text</type>
864                     <length>40</length>
865                     <notnull>false</notnull>
866                 </field>
867                 <field>
868                     <name>result</name>
869                     <type>integer</type>
870                     <notnull>true</notnull>
871                     <unsigned>false</unsigned>
872                 </field>
873                 <field>
874                     <name>clienttype</name>
875                     <type>text</type>
876                     <length>128</length>
877                     <notnull>false</notnull>
878                 </field>
879                 <field>
880                     <name>user_agent</name>
881                     <type>text</type>
882                     <length>255</length>
883                 </field>
884                 <index>
885                     <name>id</name>
886                     <primary>true</primary>
887                     <field>
888                         <name>id</name>
889                     </field>
890                 </index>
891                 <index>
892                     <name>sessionid</name>
893                     <field>
894                         <name>sessionid</name>
895                     </field>
896                 </index>
897                 <index>
898                     <name>li</name>
899                     <field>
900                         <name>li</name>
901                     </field>
902                 </index>
903                 <index>
904                     <name>account_id-ip</name>
905                     <field>
906                         <name>account_id</name>
907                     </field>
908                     <field>
909                         <name>ip</name>
910                     </field>
911                 </index>
912             </declaration>
913         </table>
914
915         <table>
916             <name>record_observer</name>
917             <version>4</version>
918             <declaration>
919                 <field>
920                     <name>id</name>
921                     <type>integer</type>
922                     <autoincrement>true</autoincrement>
923                 </field>
924                 <field>
925                     <name>observable_model</name>
926                     <type>text</type>
927                     <length>100</length>
928                     <notnull>true</notnull>
929                 </field>
930                 <field>
931                     <name>observable_identifier</name>
932                     <type>text</type>
933                     <length>40</length>
934                     <notnull>true</notnull>
935                 </field>
936                 <field>
937                     <name>observer_model</name>
938                     <type>text</type>
939                     <length>100</length>
940                     <notnull>true</notnull>
941                 </field>
942                 <field>
943                     <name>observer_identifier</name>
944                     <type>text</type>
945                     <length>40</length>
946                     <notnull>true</notnull>
947                 </field>
948                 <field>
949                     <name>observed_event</name>
950                     <type>text</type>
951                     <length>100</length>
952                     <notnull>true</notnull>
953                 </field>
954                 <field>
955                     <name>created_by</name>
956                     <type>text</type>
957                     <length>40</length>
958                 </field>
959                 <field>
960                     <name>creation_time</name>
961                     <type>datetime</type>
962                     <notnull>true</notnull>
963                 </field>
964                 <index>
965                     <name>id</name>
966                     <primary>true</primary>
967                     <field>
968                         <name>id</name>
969                     </field>
970                 </index>
971                 <index>
972                     <name>observable-observer-event</name>
973                     <unique>true</unique>
974                     <field>
975                         <name>observable_model</name>
976                     </field>
977                     <field>
978                         <name>observable_identifier</name>
979                     </field>
980                     <field>
981                         <name>observer_model</name>
982                     </field>
983                     <field>
984                         <name>observer_identifier</name>
985                     </field>
986                     <field>
987                         <name>observed_event</name>
988                     </field>
989                 </index>
990                 <index>
991                     <name>observer</name>
992                     <field>
993                         <name>observer_model</name>
994                     </field>
995                     <field>
996                         <name>observer_identifier</name>
997                     </field>
998                 </index>
999             </declaration>
1000         </table>
1001
1002         <table>
1003             <name>relations</name>
1004             <version>9</version>
1005             <declaration>
1006                 <field>
1007                     <name>id</name>
1008                     <type>text</type>
1009                     <length>40</length>
1010                     <notnull>true</notnull>
1011                 </field>
1012                 <field>
1013                     <name>rel_id</name>
1014                     <type>text</type>
1015                     <length>40</length>
1016                     <notnull>true</notnull>
1017                 </field>
1018                 <field>
1019                     <name>own_model</name>
1020                     <type>text</type>
1021                     <length>40</length>
1022                     <notnull>true</notnull>
1023                 </field>
1024                 <field>
1025                     <name>own_backend</name>
1026                     <type>text</type>
1027                     <length>40</length>
1028                     <notnull>true</notnull>
1029                 </field>
1030                 <field>
1031                     <name>own_id</name>
1032                     <type>text</type>
1033                     <length>40</length>
1034                     <notnull>true</notnull>
1035                 </field>
1036                 <field>
1037                     <name>related_degree</name>
1038                     <type>text</type>
1039                     <length>32</length>
1040                     <notnull>true</notnull>
1041                 </field>
1042                 <field>
1043                     <name>related_model</name>
1044                     <type>text</type>
1045                     <length>40</length>
1046                     <notnull>true</notnull>
1047                 </field>
1048                 <field>
1049                     <name>related_backend</name>
1050                     <type>text</type>
1051                     <length>40</length>
1052                     <notnull>true</notnull>
1053                 </field>
1054                 <field>
1055                     <name>related_id</name>
1056                     <type>text</type>
1057                     <length>40</length>
1058                     <notnull>true</notnull>
1059                 </field>
1060                 <field>
1061                     <name>type</name>
1062                     <type>text</type>
1063                     <length>40</length>
1064                     <notnull>true</notnull>
1065                 </field>
1066                 <field>
1067                     <name>remark</name>
1068                     <type>text</type>
1069                 </field>
1070                 <field>
1071                     <name>created_by</name>
1072                     <type>text</type>
1073                     <length>40</length>
1074                     <notnull>false</notnull>
1075                 </field>
1076                 <field>
1077                     <name>creation_time</name>
1078                     <type>datetime</type>
1079                     <notnull>false</notnull>
1080                 </field>
1081                 <field>
1082                     <name>last_modified_by</name>
1083                     <type>text</type>
1084                     <length>40</length>
1085                     <notnull>false</notnull>
1086                 </field>
1087                 <field>
1088                     <name>last_modified_time</name>
1089                     <type>datetime</type>
1090                     <notnull>false</notnull>
1091                 </field>
1092                 <field>
1093                     <name>is_deleted</name>
1094                     <type>boolean</type>
1095                     <notnull>true</notnull>
1096                     <default>false</default>
1097                 </field>
1098                 <field>
1099                     <name>deleted_by</name>
1100                     <type>text</type>
1101                     <length>40</length>
1102                     <notnull>false</notnull>
1103                 </field>
1104                 <field>
1105                     <name>deleted_time</name>
1106                     <type>datetime</type>
1107                     <notnull>false</notnull>
1108                 </field>
1109                 <field>
1110                     <name>seq</name>
1111                     <type>integer</type>
1112                     <notnull>true</notnull>
1113                     <default>0</default>
1114                 </field>
1115                 <index>
1116                     <name>id</name>
1117                     <primary>true</primary>
1118                     <field>
1119                         <name>id</name>
1120                     </field>
1121                 </index>
1122                 <index>
1123                     <name>own_id</name>
1124                     <field>
1125                         <name>own_id</name>
1126                     </field>
1127                 </index>
1128                 <index>
1129                     <name>rel_id-own_model-own_backend-own_id</name>
1130                     <unique>true</unique>
1131                     <field>
1132                         <name>rel_id</name>
1133                     </field>
1134                     <field>
1135                         <name>own_model</name>
1136                     </field>
1137                     <field>
1138                         <name>own_backend</name>
1139                     </field>
1140                     <field>
1141                         <name>own_id</name>
1142                     </field>
1143                 </index>
1144                 <index>
1145                     <name>unique-fields</name>
1146                     <unique>true</unique>
1147                     <field>
1148                         <name>own_model</name>
1149                     </field>
1150                     <field>
1151                         <name>own_backend</name>
1152                     </field>
1153                     <field>
1154                         <name>own_id</name>
1155                     </field>
1156                     <field>
1157                         <name>related_model</name>
1158                     </field>
1159                     <field>
1160                         <name>related_backend</name>
1161                     </field>
1162                     <field>
1163                         <name>related_id</name>
1164                     </field>
1165                     <field>
1166                         <name>type</name>
1167                     </field>
1168                 </index>
1169             </declaration>
1170         </table>
1171
1172         <table>
1173             <name>timemachine_modlog</name>
1174             <version>5</version>
1175             <declaration>
1176                 <field>
1177                     <name>id</name>
1178                     <type>text</type>
1179                     <length>40</length>
1180                     <notnull>true</notnull>
1181                 </field>
1182                 <field>
1183                     <name>instance_id</name>
1184                     <type>text</type>
1185                     <length>40</length>
1186                     <notnull>false</notnull>
1187                 </field>
1188                 <field>
1189                     <name>instance_seq</name>
1190                     <type>integer</type>
1191                     <notnull>true</notnull>
1192                     <autoincrement>true</autoincrement>
1193                 </field>
1194                 <field>
1195                     <name>change_type</name>
1196                     <type>text</type>
1197                     <length>40</length>
1198                     <notnull>false</notnull>
1199                 </field>
1200                 <field>
1201                     <name>application_id</name>
1202                     <type>text</type>
1203                     <length>40</length>
1204                     <notnull>true</notnull>
1205                 </field>
1206                 <field>
1207                     <name>record_id</name>
1208                     <type>text</type>
1209                     <length>40</length>
1210                     <notnull>false</notnull>
1211                 </field>
1212                 <field>
1213                     <name>record_type</name>
1214                     <type>text</type>
1215                     <length>64</length>
1216                     <notnull>false</notnull>
1217                 </field>
1218                 <field>
1219                     <name>record_backend</name>
1220                     <type>text</type>
1221                     <length>64</length>
1222                     <notnull>false</notnull>
1223                 </field>
1224                 <field>
1225                     <name>modification_time</name>
1226                     <type>datetime</type>
1227                     <notnull>true</notnull>
1228                 </field>
1229                 <field>
1230                     <name>modification_account</name>
1231                     <type>text</type>
1232                     <length>40</length>
1233                     <notnull>true</notnull>
1234                 </field>
1235                 <field>
1236                     <name>modified_attribute</name>
1237                     <type>text</type>
1238                     <length>64</length>
1239                     <notnull>false</notnull>
1240                 </field>
1241                 <field>
1242                     <name>old_value</name>
1243                     <type>clob</type>
1244                 </field>
1245                 <field>
1246                     <name>new_value</name>
1247                     <type>clob</type>
1248                 </field>
1249                 <field>
1250                     <name>seq</name>
1251                     <type>integer</type>
1252                     <length>64</length>
1253                 </field>
1254                 <field>
1255                     <name>client</name>
1256                     <type>text</type>
1257                     <length>255</length>
1258                     <notnull>true</notnull>
1259                 </field>
1260                 <index>
1261                     <name>id</name>
1262                     <primary>true</primary>
1263                     <field>
1264                         <name>id</name>
1265                     </field>
1266                 </index>
1267                 <index>
1268                     <name>instance_id</name>
1269                     <field>
1270                         <name>instance_id</name>
1271                     </field>
1272                 </index>
1273                 <index>
1274                     <name>instance_seq</name>
1275                     <unique>true</unique>
1276                     <field>
1277                         <name>instance_seq</name>
1278                     </field>
1279                 </index>
1280                 <index>
1281                     <name>seq</name>
1282                     <field>
1283                         <name>seq</name>
1284                     </field>
1285                 </index>
1286                 <index>
1287                     <name>unique-fields</name>
1288                     <unique>true</unique>
1289                     <field>
1290                         <name>application_id</name>
1291                     </field>
1292                     <field>
1293                         <name>record_id</name>
1294                     </field>
1295                     <field>
1296                         <name>record_type</name>
1297                     </field>
1298                     <field>
1299                         <name>modification_time</name>
1300                     </field>
1301                     <field>
1302                         <name>modification_account</name>
1303                     </field>
1304                     <field>
1305                         <name>modified_attribute</name>
1306                     </field>
1307                     <field>
1308                         <name>seq</name>
1309                     </field>
1310                 </index>
1311             </declaration>
1312         </table>
1313
1314         <table>
1315             <name>tags</name>
1316             <version>9</version>
1317             <declaration>
1318                 <field>
1319                     <name>id</name>
1320                     <type>text</type>
1321                     <length>40</length>
1322                     <notnull>true</notnull>
1323                 </field>
1324                 <field>
1325                     <name>type</name>
1326                     <type>text</type>
1327                     <length>32</length>
1328                     <notnull>true</notnull>
1329                 </field>
1330                 <field>
1331                     <name>owner</name>
1332                     <type>text</type>
1333                     <length>40</length>
1334                 </field>
1335                 <field>
1336                     <name>name</name>
1337                     <type>text</type>
1338                     <length>255</length>
1339                     <default>NULL</default>
1340                 </field>
1341                 <field>
1342                     <name>description</name>
1343                     <!--Long text!-->
1344                     <length>2147483647</length>
1345                     <type>text</type>
1346                     <default>NULL</default>
1347                 </field>
1348                 <field>
1349                     <name>color</name>
1350                     <type>text</type>
1351                     <length>7</length>
1352                     <default>NULL</default>
1353                 </field>
1354                 <field>
1355                     <name>occurrence</name>
1356                     <type>integer</type>
1357                 </field>
1358                 <field>
1359                     <name>created_by</name>
1360                     <type>text</type>
1361                     <length>40</length>
1362                 </field>
1363                 <field>
1364                     <name>creation_time</name>
1365                     <type>datetime</type>
1366                 </field>
1367                 <field>
1368                     <name>last_modified_by</name>
1369                     <type>text</type>
1370                     <length>40</length>
1371                 </field>
1372                 <field>
1373                     <name>last_modified_time</name>
1374                     <type>datetime</type>
1375                 </field>
1376                 <field>
1377                     <name>is_deleted</name>
1378                     <type>boolean</type>
1379                     <notnull>true</notnull>
1380                     <default>false</default>
1381                 </field>
1382                 <field>
1383                     <name>deleted_by</name>
1384                     <type>text</type>
1385                     <length>40</length>
1386                 </field>
1387                 <field>
1388                     <name>deleted_time</name>
1389                     <type>datetime</type>
1390                 </field>
1391                 <field>
1392                     <name>seq</name>
1393                     <type>integer</type>
1394                     <notnull>true</notnull>
1395                     <default>0</default>
1396                 </field>
1397                 <index>
1398                     <name>id</name>
1399                     <primary>true</primary>
1400                     <field>
1401                         <name>id</name>
1402                     </field>
1403                 </index>
1404                 <index>
1405                     <name>owner</name>
1406                     <field>
1407                         <name>owner</name>
1408                     </field>
1409                 </index>
1410                 <index>
1411                     <name>name</name>
1412                     <field>
1413                         <name>name</name>
1414                     </field>
1415                 </index>
1416                 <index>
1417                     <name>description</name>
1418                     <fulltext>true</fulltext>
1419                     <field>
1420                         <name>description</name>
1421                     </field>
1422                 </index>
1423             </declaration>
1424         </table>
1425
1426         <table>
1427             <name>tags_acl</name>
1428             <version>3</version>
1429             <declaration>
1430                 <field>
1431                     <name>tag_id</name>
1432                     <type>text</type>
1433                     <length>40</length>
1434                     <notnull>true</notnull>
1435                 </field>
1436                 <field>
1437                     <name>account_type</name>
1438                     <type>text</type>
1439                     <length>32</length>
1440                     <default>user</default>
1441                     <notnull>true</notnull>
1442                 </field>
1443                 <field>
1444                     <name>account_id</name>
1445                     <type>text</type>
1446                     <length>40</length>
1447                     <notnull>true</notnull>
1448                 </field>
1449                 <field>
1450                     <name>account_right</name>
1451                     <type>text</type>
1452                     <length>10</length>
1453                     <notnull>true</notnull>
1454                 </field>
1455                 <index>
1456                     <name>tag_id-account_type-account_id-account_right</name>
1457                     <primary>true</primary>
1458                     <field>
1459                         <name>tag_id</name>
1460                     </field>
1461                     <field>
1462                         <name>account_type</name>
1463                     </field>
1464                     <field>
1465                         <name>account_id</name>
1466                     </field>
1467                     <field>
1468                         <name>account_right</name>
1469                     </field>
1470                 </index>
1471                 <index>
1472                     <name>tag_id-account_type-account_id</name>
1473                     <field>
1474                         <name>tag_id</name>
1475                     </field>
1476                     <field>
1477                         <name>account_type</name>
1478                     </field>
1479                     <field>
1480                         <name>account_id</name>
1481                     </field>
1482                 </index>
1483                 <index>
1484                     <name>tags_acl::tag_id--tags::id</name>
1485                     <field>
1486                         <name>tag_id</name>
1487                     </field>
1488                     <foreign>true</foreign>
1489                     <reference>
1490                         <table>tags</table>
1491                         <field>id</field>
1492                         <ondelete>cascade</ondelete>
1493                     </reference>
1494                 </index>
1495             </declaration>
1496         </table>
1497
1498         <table>
1499             <name>tags_context</name>
1500             <version>2</version>
1501             <declaration>
1502                 <field>
1503                     <name>tag_id</name>
1504                     <type>text</type>
1505                     <length>40</length>
1506                     <notnull>true</notnull>
1507                 </field>
1508                 <field>
1509                     <name>application_id</name>
1510                     <type>text</type>
1511                     <length>40</length>
1512                     <notnull>true</notnull>
1513                 </field>
1514                 <index>
1515                     <name>tag_id-application_id</name>
1516                     <primary>true</primary>
1517                     <field>
1518                         <name>tag_id</name>
1519                     </field>
1520                     <field>
1521                         <name>application_id</name>
1522                     </field>
1523                 </index>
1524                 <index>
1525                     <name>application_id</name>
1526                     <field>
1527                         <name>application_id</name>
1528                     </field>
1529                 </index>
1530                 <index>
1531                     <name>tags_context::tag_id--tags::id</name>
1532                     <field>
1533                         <name>tag_id</name>
1534                     </field>
1535                     <foreign>true</foreign>
1536                     <reference>
1537                         <table>tags</table>
1538                         <field>id</field>
1539                         <ondelete>cascade</ondelete>
1540                     </reference>
1541                 </index>
1542
1543             </declaration>
1544         </table>
1545
1546         <table>
1547             <name>tagging</name>
1548             <version>2</version>
1549             <declaration>
1550                 <field>
1551                     <name>tag_id</name>
1552                     <type>text</type>
1553                     <length>40</length>
1554                     <notnull>true</notnull>
1555                 </field>
1556                 <field>
1557                     <name>application_id</name>
1558                     <type>text</type>
1559                     <length>40</length>
1560                     <notnull>true</notnull>
1561                 </field>
1562                 <field>
1563                     <name>record_id</name>
1564                     <type>text</type>
1565                     <length>40</length>
1566                     <notnull>true</notnull>
1567                 </field>
1568                 <field>
1569                     <name>record_backend_id</name>
1570                     <type>text</type>
1571                     <length>40</length>
1572                     <notnull>true</notnull>
1573                 </field>
1574                 <index>
1575                     <name>tag_id-application_id-record_id-record_backend_id</name>
1576                     <primary>true</primary>
1577                     <field>
1578                         <name>tag_id</name>
1579                     </field>
1580                     <field>
1581                         <name>application_id</name>
1582                     </field>
1583                     <field>
1584                         <name>record_id</name>
1585                     </field>
1586                     <field>
1587                         <name>record_backend_id</name>
1588                     </field>
1589                 </index>
1590
1591                 <index>
1592                     <name>application_id</name>
1593                     <field>
1594                         <name>application_id</name>
1595                     </field>
1596                 </index>
1597                 <index>
1598                     <name>record_id</name>
1599                     <field>
1600                         <name>record_id</name>
1601                     </field>
1602                 </index>
1603                 <index>
1604                     <name>tagging::tag_id--tags::id</name>
1605                     <field>
1606                         <name>tag_id</name>
1607                     </field>
1608                     <foreign>true</foreign>
1609                     <reference>
1610                         <table>tags</table>
1611                         <field>id</field>
1612                         <ondelete>cascade</ondelete>
1613                     </reference>
1614                 </index>
1615             </declaration>
1616         </table>
1617
1618         <table>
1619             <name>roles</name>
1620             <version>2</version>
1621             <declaration>
1622                 <field>
1623                     <name>id</name>
1624                     <type>integer</type>
1625                     <autoincrement>true</autoincrement>
1626                 </field>
1627                 <field>
1628                     <name>name</name>
1629                     <type>text</type>
1630                     <length>128</length>
1631                     <notnull>true</notnull>
1632                 </field>
1633                 <field>
1634                     <name>description</name>
1635                     <type>text</type>
1636                     <length>255</length>
1637                     <notnull>false</notnull>
1638                 </field>
1639                 <field>
1640                     <name>created_by</name>
1641                     <type>text</type>
1642                     <length>40</length>
1643                 </field>
1644                 <field>
1645                     <name>creation_time</name>
1646                     <type>datetime</type>
1647                 </field>
1648                 <field>
1649                     <name>last_modified_by</name>
1650                     <type>text</type>
1651                     <length>40</length>
1652                 </field>
1653                 <field>
1654                     <name>last_modified_time</name>
1655                     <type>datetime</type>
1656                 </field>
1657                 <field>
1658                     <name>is_deleted</name>
1659                     <type>boolean</type>
1660                     <default>false</default>
1661                 </field>
1662                 <field>
1663                     <name>deleted_by</name>
1664                     <type>text</type>
1665                     <length>40</length>
1666                 </field>
1667                 <field>
1668                     <name>deleted_time</name>
1669                     <type>datetime</type>
1670                 </field>
1671                 <field>
1672                     <name>seq</name>
1673                     <type>integer</type>
1674                     <notnull>true</notnull>
1675                     <default>0</default>
1676                 </field>
1677                 <index>
1678                     <name>id</name>
1679                     <primary>true</primary>
1680                     <field>
1681                         <name>id</name>
1682                     </field>
1683                 </index>
1684                 <index>
1685                     <name>name</name>
1686                     <unique>true</unique>
1687                     <field>
1688                         <name>name</name>
1689                     </field>
1690                 </index>
1691             </declaration>
1692         </table>
1693
1694         <table>
1695             <name>role_rights</name>
1696             <version>2</version>
1697             <declaration>
1698                 <field>
1699                     <name>id</name>
1700                     <type>integer</type>
1701                     <autoincrement>true</autoincrement>
1702                 </field>
1703                 <field>
1704                     <name>role_id</name>
1705                     <type>integer</type>
1706                     <unsigned>true</unsigned>
1707                     <notnull>true</notnull>
1708                 </field>
1709                 <field>
1710                     <name>application_id</name>
1711                     <type>text</type>
1712                     <length>40</length>
1713                     <notnull>true</notnull>
1714                 </field>
1715                 <field>
1716                     <name>right</name>
1717                     <type>text</type>
1718                     <length>64</length>
1719                     <notnull>true</notnull>
1720                 </field>
1721                 <index>
1722                     <name>id</name>
1723                     <primary>true</primary>
1724                     <field>
1725                         <name>id</name>
1726                     </field>
1727                 </index>
1728                 <index>
1729                     <name>role_id</name>
1730                     <field>
1731                         <name>role_id</name>
1732                     </field>
1733                 </index>
1734                 <index>
1735                     <name>application_id</name>
1736                     <field>
1737                         <name>application_id</name>
1738                     </field>
1739                 </index>
1740                 <index>
1741                     <name>role_rights::application_id--applications::id</name>
1742                     <field>
1743                         <name>application_id</name>
1744                     </field>
1745                     <foreign>true</foreign>
1746                     <reference>
1747                         <table>applications</table>
1748                         <field>id</field>
1749                         <ondelete>cascade</ondelete>
1750                     </reference>
1751                 </index>
1752                 <index>
1753                     <name>role_rights::role_id--roles::id</name>
1754                     <field>
1755                         <name>role_id</name>
1756                     </field>
1757                     <foreign>true</foreign>
1758                     <reference>
1759                         <table>roles</table>
1760                         <field>id</field>
1761                         <ondelete>cascade</ondelete>
1762                     </reference>
1763                 </index>
1764             </declaration>
1765         </table>
1766
1767         <table>
1768             <name>role_accounts</name>
1769             <version>4</version>
1770             <declaration>
1771                 <field>
1772                     <name>id</name>
1773                     <type>text</type>
1774                     <length>40</length>
1775                 </field>
1776                 <field>
1777                     <name>role_id</name>
1778                     <type>integer</type>
1779                     <unsigned>true</unsigned>
1780                     <notnull>true</notnull>
1781                 </field>
1782                 <field>
1783                     <name>account_type</name>
1784                     <type>text</type>
1785                     <length>32</length>
1786                     <default>user</default>
1787                     <notnull>true</notnull>
1788                 </field>
1789                 <field>
1790                     <name>account_id</name>
1791                     <type>text</type>
1792                     <length>40</length>
1793                     <notnull>false</notnull>
1794                 </field>
1795
1796                 <index>
1797                     <name>id</name>
1798                     <primary>true</primary>
1799                     <field>
1800                         <name>id</name>
1801                     </field>
1802                 </index>
1803                 <index>
1804                     <name>account_id-account_type-role_id</name>
1805                     <unique>true</unique>
1806                     <field>
1807                         <name>role_id</name>
1808                     </field>
1809                     <field>
1810                         <name>account_id</name>
1811                     </field>
1812                     <field>
1813                         <name>account_type</name>
1814                     </field>
1815                 </index>
1816                 <index>
1817                     <name>role_accounts::role_id--roles::id</name>
1818                     <field>
1819                         <name>role_id</name>
1820                     </field>
1821                     <foreign>true</foreign>
1822                     <reference>
1823                         <table>roles</table>
1824                         <field>id</field>
1825                         <ondelete>cascade</ondelete>
1826                     </reference>
1827                 </index>
1828             </declaration>
1829         </table>
1830
1831         <table>
1832             <name>temp_files</name>
1833             <version>1</version>
1834             <declaration>
1835                 <field>
1836                     <name>id</name>
1837                     <type>text</type>
1838                     <length>40</length>
1839                     <notnull>true</notnull>
1840                 </field>
1841                 <field>
1842                     <name>session_id</name>
1843                     <type>text</type>
1844                     <notnull>true</notnull>
1845                 </field>
1846                 <field>
1847                     <name>time</name>
1848                     <type>datetime</type>
1849                 </field>
1850                 <field>
1851                     <name>path</name>
1852                     <type>text</type>
1853                     <notnull>true</notnull>
1854                 </field>
1855                 <field>
1856                     <name>name</name>
1857                     <type>text</type>
1858                     <notnull>true</notnull>
1859                 </field>
1860                 <field>
1861                     <name>type</name>
1862                     <type>text</type>
1863                     <notnull>true</notnull>
1864                 </field>
1865                 <field>
1866                     <name>error</name>
1867                     <type>integer</type>
1868                     <notnull>true</notnull>
1869                 </field>
1870                 <field>
1871                     <name>size</name>
1872                     <type>integer</type>
1873                     <unsigned>true</unsigned>
1874                     <notnull>true</notnull>
1875                 </field>
1876
1877                 <index>
1878                     <name>id</name>
1879                     <primary>true</primary>
1880                     <field>
1881                         <name>id</name>
1882                     </field>
1883                 </index>
1884             </declaration>
1885         </table>
1886
1887         <table>
1888             <name>config</name>
1889             <version>1</version>
1890             <declaration>
1891                 <field>
1892                     <name>id</name>
1893                     <type>text</type>
1894                     <length>40</length>
1895                     <notnull>true</notnull>
1896                 </field>
1897                 <field>
1898                     <name>application_id</name>
1899                     <type>text</type>
1900                     <length>40</length>
1901                     <notnull>true</notnull>
1902                 </field>
1903                 <field>
1904                     <name>name</name>
1905                     <type>text</type>
1906                     <length>255</length>
1907                     <notnull>true</notnull>
1908                 </field>
1909                 <field>
1910                     <name>value</name>
1911                     <type>text</type>
1912                     <notnull>true</notnull>
1913                 </field>
1914                 <index>
1915                     <name>id</name>
1916                     <primary>true</primary>
1917                     <field>
1918                         <name>id</name>
1919                     </field>
1920                 </index>
1921                 <index>
1922                     <name>application_id-name</name>
1923                     <unique>true</unique>
1924                     <field>
1925                         <name>application_id</name>
1926                     </field>
1927                     <field>
1928                         <name>name</name>
1929                     </field>
1930                 </index>
1931                 <index>
1932                     <name>config::application_id--applications::id</name>
1933                     <field>
1934                         <name>application_id</name>
1935                     </field>
1936                     <foreign>true</foreign>
1937                     <reference>
1938                         <table>applications</table>
1939                         <field>id</field>
1940                         <!-- add onupdate/ondelete? -->
1941                     </reference>
1942                 </index>
1943             </declaration>
1944         </table>
1945         <table>
1946             <name>preferences</name>
1947             <version>8</version>
1948             <declaration>
1949                 <field>
1950                     <name>id</name>
1951                     <type>text</type>
1952                     <length>40</length>
1953                     <notnull>true</notnull>
1954                 </field>
1955                 <field>
1956                     <name>account_type</name>
1957                     <type>text</type>
1958                     <length>32</length>
1959                     <default>user</default>
1960                     <notnull>true</notnull>
1961                 </field>
1962                 <field>
1963                     <name>account_id</name>
1964                     <type>text</type>
1965                     <length>40</length>
1966                     <notnull>false</notnull>
1967                 </field>
1968                 <field>
1969                     <name>application_id</name>
1970                     <type>text</type>
1971                     <length>40</length>
1972                     <notnull>true</notnull>
1973                 </field>
1974                 <field>
1975                     <name>name</name>
1976                     <type>text</type>
1977                     <length>100</length>
1978                     <notnull>true</notnull>
1979                 </field>
1980                 <field>
1981                     <name>value</name>
1982                     <type>text</type>
1983                     <notnull>true</notnull>
1984                 </field>
1985                 <field>
1986                     <name>type</name>
1987                     <type>text</type>
1988                     <length>40</length>
1989                 </field>
1990                 <field>
1991                     <name>options</name>
1992                     <type>text</type>
1993                 </field>
1994                 <field>
1995                     <name>personal_only</name>
1996                     <type>boolean</type>
1997                 </field>
1998                 <field>
1999                     <name>locked</name>
2000                     <type>boolean</type>
2001                 </field>
2002                 <index>
2003                     <name>id</name>
2004                     <primary>true</primary>
2005                     <field>
2006                         <name>id</name>
2007                     </field>
2008                 </index>
2009                 <index>
2010                     <name>app_id-name-account_id-account_type</name>
2011                     <unique>true</unique>
2012                     <field>
2013                         <name>application_id</name>
2014                     </field>
2015                     <field>
2016                         <name>name</name>
2017                     </field>
2018                     <field>
2019                         <name>account_id</name>
2020                     </field>
2021                     <field>
2022                         <name>account_type</name>
2023                     </field>
2024                 </index>
2025                 <index>
2026                     <name>preferences::application_id--applications::id</name>
2027                     <field>
2028                         <name>application_id</name>
2029                     </field>
2030                     <foreign>true</foreign>
2031                     <reference>
2032                         <table>applications</table>
2033                         <field>id</field>
2034                         <ondelete>cascade</ondelete>
2035                         <!-- add onupdate/ondelete? -->
2036                     </reference>
2037                 </index>
2038                 <index>
2039                     <name>name</name>
2040                     <field>
2041                         <name>name</name>
2042                     </field>
2043                 </index>
2044                 <index>
2045                     <name>account_id</name>
2046                     <field>
2047                         <name>account_id</name>
2048                     </field>
2049                 </index>
2050                 <index>
2051                     <name>application_id</name>
2052                     <field>
2053                         <name>application_id</name>
2054                     </field>
2055                 </index>
2056             </declaration>
2057         </table>
2058         <table>
2059             <name>customfield</name>
2060             <version>3</version>
2061             <declaration>
2062                 <field>
2063                     <name>id</name>
2064                     <type>text</type>
2065                     <length>40</length>
2066                     <notnull>true</notnull>
2067                 </field>
2068                 <field>
2069                     <name>record_id</name>
2070                     <type>text</type>
2071                     <length>40</length>
2072                     <notnull>true</notnull>
2073                 </field>
2074                 <field>
2075                     <name>customfield_id</name>
2076                     <type>text</type>
2077                     <length>40</length>
2078                     <notnull>true</notnull>
2079                 </field>
2080                 <field>
2081                     <name>value</name>
2082                     <type>text</type>
2083                 </field>
2084                 <index>
2085                     <name>id</name>
2086                     <primary>true</primary>
2087                     <field>
2088                         <name>id</name>
2089                     </field>
2090                 </index>
2091                 <index>
2092                     <name>record_id_customfield_id</name>
2093                     <unique>true</unique>
2094                     <field>
2095                         <name>record_id</name>
2096                     </field>
2097                     <field>
2098                         <name>customfield_id</name>
2099                     </field>
2100                 </index>
2101                 <index>
2102                     <name>customfield_id</name>
2103                     <field>
2104                         <name>customfield_id</name>
2105                     </field>
2106                 </index>
2107             </declaration>
2108         </table>
2109         <table>
2110             <name>customfield_config</name>
2111             <version>5</version>
2112             <declaration>
2113                 <field>
2114                     <name>id</name>
2115                     <type>text</type>
2116                     <length>40</length>
2117                     <notnull>true</notnull>
2118                 </field>
2119                 <field>
2120                     <name>application_id</name>
2121                     <type>text</type>
2122                     <length>40</length>
2123                     <notnull>true</notnull>
2124                 </field>
2125                 <field>
2126                     <name>model</name>
2127                     <type>text</type>
2128                     <length>40</length>
2129                     <notnull>true</notnull>
2130                 </field>
2131                 <field>
2132                     <name>name</name>
2133                     <type>text</type>
2134                     <length>40</length>
2135                     <notnull>true</notnull>
2136                 </field>
2137                 <field>
2138                     <name>definition</name>
2139                     <type>text</type>
2140                 </field>
2141                 <index>
2142                     <name>id</name>
2143                     <primary>true</primary>
2144                     <field>
2145                         <name>id</name>
2146                     </field>
2147                 </index>
2148                 <index>
2149                     <name>application_id-name</name>
2150                     <unique>true</unique>
2151                     <field>
2152                         <name>application_id</name>
2153                     </field>
2154                     <field>
2155                         <name>name</name>
2156                     </field>
2157                 </index>
2158                 <index>
2159                     <name>config_customfields::application_id--applications::id</name>
2160                     <field>
2161                         <name>application_id</name>
2162                     </field>
2163                     <foreign>true</foreign>
2164                     <reference>
2165                         <table>applications</table>
2166                         <field>id</field>
2167                         <!-- add onupdate/ondelete? -->
2168                     </reference>
2169                 </index>
2170             </declaration>
2171         </table>
2172         <table>
2173             <name>customfield_acl</name>
2174             <version>2</version>
2175             <declaration>
2176                 <field>
2177                     <name>id</name>
2178                     <type>text</type>
2179                     <length>40</length>
2180                     <notnull>true</notnull>
2181                 </field>
2182                 <field>
2183                     <name>customfield_id</name>
2184                     <type>text</type>
2185                     <length>40</length>
2186                     <notnull>true</notnull>
2187                 </field>
2188                 <field>
2189                     <name>account_type</name>
2190                     <type>text</type>
2191                     <length>32</length>
2192                     <default>user</default>
2193                     <notnull>true</notnull>
2194                 </field>
2195                 <field>
2196                     <name>account_id</name>
2197                     <type>text</type>
2198                     <length>40</length>
2199                     <notnull>true</notnull>
2200                 </field>
2201                 <field>
2202                     <name>account_grant</name>
2203                     <type>text</type>
2204                     <length>40</length>
2205                     <notnull>true</notnull>
2206                 </field>
2207                 <index>
2208                     <name>customfield_id-account-type-account_id-account_grant</name>
2209                     <primary>true</primary>
2210                     <field>
2211                         <name>id</name>
2212                     </field>
2213                     <field>
2214                         <name>customfield_id</name>
2215                     </field>
2216                     <field>
2217                         <name>account_type</name>
2218                     </field>
2219                     <field>
2220                         <name>account_id</name>
2221                     </field>
2222                     <field>
2223                         <name>account_grant</name>
2224                     </field>
2225                 </index>
2226                 <index>
2227                     <name>id-account_type-account_id</name>
2228                     <field>
2229                         <name>customfield_id</name>
2230                     </field>
2231                     <field>
2232                         <name>account_type</name>
2233                     </field>
2234                     <field>
2235                         <name>account_id</name>
2236                     </field>
2237                 </index>
2238                 <index>
2239                     <name>customfield_acl::customfield_id--customfield_config::id</name>
2240                     <field>
2241                         <name>customfield_id</name>
2242                     </field>
2243                     <foreign>true</foreign>
2244                     <reference>
2245                         <table>customfield_config</table>
2246                         <field>id</field>
2247                         <ondelete>cascade</ondelete>
2248                         <!-- add onupdate? -->
2249                     </reference>
2250                 </index>
2251             </declaration>
2252         </table>
2253         <table>
2254             <name>note_types</name>
2255             <version>3</version>
2256             <declaration>
2257                 <field>
2258                     <name>id</name>
2259                     <type>text</type>
2260                     <length>40</length>
2261                     <notnull>true</notnull>
2262                 </field>
2263                 <field>
2264                     <name>name</name>
2265                     <type>text</type>
2266                     <length>64</length>
2267                     <notnull>true</notnull>
2268                 </field>
2269                 <field>
2270                     <name>description</name>
2271                     <type>text</type>
2272                     <length>255</length>
2273                     <default>NULL</default>
2274                 </field>
2275                 <field>
2276                     <name>icon</name>
2277                     <type>text</type>
2278                     <length>255</length>
2279                     <notnull>true</notnull>
2280                 </field>
2281                 <field>
2282                     <name>icon_class</name>
2283                     <type>text</type>
2284                     <length>128</length>
2285                     <default>NULL</default>
2286                 </field>
2287                 <field>
2288                     <name>is_user_type</name>
2289                     <type>boolean</type>
2290                     <notnull>true</notnull>
2291                     <default>true</default>
2292                 </field>
2293                 <index>
2294                     <name>id</name>
2295                     <primary>true</primary>
2296                     <field>
2297                         <name>id</name>
2298                     </field>
2299                 </index>
2300             </declaration>
2301         </table>
2302         <table>
2303             <name>notes</name>
2304             <version>2</version>
2305             <declaration>
2306                 <field>
2307                     <name>id</name>
2308                     <type>text</type>
2309                     <length>40</length>
2310                     <notnull>true</notnull>
2311                 </field>
2312                 <field>
2313                     <name>note_type_id</name>
2314                     <type>text</type>
2315                     <length>40</length>
2316                     <notnull>true</notnull>
2317                 </field>
2318                 <field>
2319                     <name>note</name>
2320                     <type>text</type>
2321                     <default>NULL</default>
2322                 </field>
2323                 <field>
2324                     <name>record_model</name>
2325                     <type>text</type>
2326                     <length>40</length>
2327                     <notnull>true</notnull>
2328                 </field>
2329                 <field>
2330                     <name>record_backend</name>
2331                     <type>text</type>
2332                     <length>40</length>
2333                     <notnull>true</notnull>
2334                 </field>
2335                 <field>
2336                     <name>record_id</name>
2337                     <type>text</type>
2338                     <length>40</length>
2339                     <notnull>true</notnull>
2340                 </field>
2341                 <field>
2342                     <name>created_by</name>
2343                     <type>text</type>
2344                     <length>40</length>
2345                 </field>
2346                 <field>
2347                     <name>creation_time</name>
2348                     <type>datetime</type>
2349                 </field>
2350                 <field>
2351                     <name>last_modified_by</name>
2352                     <type>text</type>
2353                     <length>40</length>
2354                 </field>
2355                 <field>
2356                     <name>last_modified_time</name>
2357                     <type>datetime</type>
2358                 </field>
2359                 <field>
2360                     <name>is_deleted</name>
2361                     <type>boolean</type>
2362                     <notnull>true</notnull>
2363                     <default>false</default>
2364                 </field>
2365                 <field>
2366                     <name>deleted_by</name>
2367                     <type>text</type>
2368                     <length>40</length>
2369                 </field>
2370                 <field>
2371                     <name>deleted_time</name>
2372                     <type>datetime</type>
2373                 </field>
2374                 <field>
2375                     <name>seq</name>
2376                     <type>integer</type>
2377                     <notnull>true</notnull>
2378                     <default>0</default>
2379                 </field>
2380                 <index>
2381                     <name>id</name>
2382                     <primary>true</primary>
2383                     <field>
2384                         <name>id</name>
2385                     </field>
2386                 </index>
2387                 <index>
2388                     <name>record_id</name>
2389                     <field>
2390                         <name>record_id</name>
2391                     </field>
2392                 </index>
2393                 <index>
2394                     <name>record_model</name>
2395                     <field>
2396                         <name>record_model</name>
2397                     </field>
2398                 </index>
2399                 <index>
2400                     <name>record_backend</name>
2401                     <field>
2402                         <name>record_backend</name>
2403                     </field>
2404                 </index>
2405                 <index>
2406                     <name>notes::note_type_id--note_types::id</name>
2407                     <field>
2408                         <name>note_type_id</name>
2409                     </field>
2410                     <foreign>true</foreign>
2411                     <reference>
2412                         <table>note_types</table>
2413                         <field>id</field>
2414                         <!-- add onupdate/ondelete? -->
2415                     </reference>
2416                 </index>
2417             </declaration>
2418         </table>
2419         <table>
2420             <name>filter</name>
2421             <version>5</version>
2422             <declaration>
2423                 <field>
2424                     <name>id</name>
2425                     <type>text</type>
2426                     <length>40</length>
2427                     <notnull>true</notnull>
2428                 </field>
2429                 <field>
2430                     <name>application_id</name>
2431                     <type>text</type>
2432                     <length>40</length>
2433                     <notnull>true</notnull>
2434                 </field>
2435                 <field>
2436                     <name>account_id</name>
2437                     <type>text</type>
2438                     <length>40</length>
2439                     <notnull>false</notnull>
2440                 </field>
2441                 <field>
2442                     <name>model</name>
2443                     <type>text</type>
2444                     <length>64</length>
2445                     <notnull>true</notnull>
2446                 </field>
2447                 <field>
2448                     <name>filters</name>
2449                     <type>text</type>
2450                     <notnull>true</notnull>
2451                 </field>
2452                 <field>
2453                     <name>name</name>
2454                     <type>text</type>
2455                     <length>40</length>
2456                     <notnull>true</notnull>
2457                 </field>
2458                 <field>
2459                     <name>description</name>
2460                     <type>text</type>
2461                     <notnull>false</notnull>
2462                 </field>
2463                 <field>
2464                     <name>created_by</name>
2465                     <type>text</type>
2466                     <length>40</length>
2467                 </field>
2468                 <field>
2469                     <name>creation_time</name>
2470                     <type>datetime</type>
2471                 </field>
2472                 <field>
2473                     <name>last_modified_by</name>
2474                     <type>text</type>
2475                     <length>40</length>
2476                 </field>
2477                 <field>
2478                     <name>last_modified_time</name>
2479                     <type>datetime</type>
2480                 </field>
2481                 <field>
2482                     <name>is_deleted</name>
2483                     <type>boolean</type>
2484                     <default>false</default>
2485                 </field>
2486                 <field>
2487                     <name>deleted_by</name>
2488                     <type>text</type>
2489                     <length>40</length>
2490                 </field>
2491                 <field>
2492                     <name>deleted_time</name>
2493                     <type>datetime</type>
2494                 </field>
2495                 <field>
2496                     <name>seq</name>
2497                     <type>integer</type>
2498                     <notnull>true</notnull>
2499                     <default>0</default>
2500                 </field>
2501                 <index>
2502                     <name>id</name>
2503                     <primary>true</primary>
2504                     <field>
2505                         <name>id</name>
2506                     </field>
2507                 </index>
2508                 <index>
2509                     <name>filter::application_id--applications::id</name>
2510                     <field>
2511                         <name>application_id</name>
2512                     </field>
2513                     <foreign>true</foreign>
2514                     <reference>
2515                         <table>applications</table>
2516                         <field>id</field>
2517                     </reference>
2518                 </index>
2519             </declaration>
2520         </table>
2521         <table>
2522             <name>filter_acl</name>
2523             <version>1</version>
2524             <declaration>
2525                 <field>
2526                     <name>id</name>
2527                     <type>text</type>
2528                     <length>40</length>
2529                     <notnull>true</notnull>
2530                 </field>
2531                 <field>
2532                     <name>record_id</name>
2533                     <type>text</type>
2534                     <length>40</length>
2535                     <notnull>true</notnull>
2536                 </field>
2537                 <field>
2538                     <name>account_type</name>
2539                     <type>text</type>
2540                     <length>32</length>
2541                     <default>user</default>
2542                     <notnull>true</notnull>
2543                 </field>
2544                 <field>
2545                     <name>account_id</name>
2546                     <type>text</type>
2547                     <length>40</length>
2548                     <notnull>true</notnull>
2549                 </field>
2550                 <field>
2551                     <name>account_grant</name>
2552                     <type>text</type>
2553                     <length>40</length>
2554                     <notnull>true</notnull>
2555                 </field>
2556                 <index>
2557                     <name>record_id-account-type-account_id-account_grant</name>
2558                     <primary>true</primary>
2559                     <field>
2560                         <name>id</name>
2561                     </field>
2562                     <field>
2563                         <name>record_id</name>
2564                     </field>
2565                     <field>
2566                         <name>account_type</name>
2567                     </field>
2568                     <field>
2569                         <name>account_id</name>
2570                     </field>
2571                     <field>
2572                         <name>account_grant</name>
2573                     </field>
2574                 </index>
2575                 <index>
2576                     <name>id-account_type-account_id</name>
2577                     <field>
2578                         <name>record_id</name>
2579                     </field>
2580                     <field>
2581                         <name>account_type</name>
2582                     </field>
2583                     <field>
2584                         <name>account_id</name>
2585                     </field>
2586                 </index>
2587                 <index>
2588                     <name>filter_acl::record_id--filter::id</name>
2589                     <field>
2590                         <name>record_id</name>
2591                     </field>
2592                     <foreign>true</foreign>
2593                     <reference>
2594                         <table>filter</table>
2595                         <field>id</field>
2596                         <ondelete>cascade</ondelete>
2597                     </reference>
2598                 </index>
2599             </declaration>
2600         </table>
2601         <table>
2602             <name>importexport_definition</name>
2603             <version>11</version>
2604             <declaration>
2605                 <field>
2606                     <name>id</name>
2607                     <type>text</type>
2608                     <length>40</length>
2609                     <notnull>true</notnull>
2610                 </field>
2611                 <field>
2612                     <name>application_id</name>
2613                     <type>text</type>
2614                     <length>40</length>
2615                     <notnull>true</notnull>
2616                 </field>
2617                 <field>
2618                     <name>label</name>
2619                     <type>text</type>
2620                     <length>128</length>
2621                     <notnull>false</notnull>
2622                 </field>
2623                 <field>
2624                     <name>model</name>
2625                     <type>text</type>
2626                     <length>64</length>
2627                     <notnull>true</notnull>
2628                 </field>
2629                 <field>
2630                     <name>name</name>
2631                     <type>text</type>
2632                     <length>40</length>
2633                     <notnull>true</notnull>
2634                 </field>
2635                 <field>
2636                     <name>description</name>
2637                     <type>text</type>
2638                     <notnull>false</notnull>
2639                 </field>
2640                 <field>
2641                     <name>type</name>
2642                     <type>text</type>
2643                     <length>32</length>
2644                     <notnull>true</notnull>
2645                 </field>
2646                 <field>
2647                     <name>plugin</name>
2648                     <type>text</type>
2649                     <length>64</length>
2650                     <notnull>true</notnull>
2651                 </field>
2652                 <field>
2653                     <name>plugin_options</name>
2654                     <type>text</type>
2655                 </field>
2656                 <field>
2657                     <name>filename</name>
2658                     <type>text</type>
2659                     <length>40</length>
2660                 </field>
2661                 <field>
2662                     <name>icon_class</name>
2663                     <type>text</type>
2664                     <length>255</length>
2665                 </field>
2666                 <field>
2667                     <name>scope</name>
2668                     <type>text</type>
2669                     <length>255</length>
2670                 </field>
2671                 <field>
2672                     <name>format</name>
2673                     <type>text</type>
2674                     <length>255</length>
2675                 </field>
2676                 <field>
2677                     <name>favorite</name>
2678                     <type>boolean</type>
2679                 </field>
2680                 <field>
2681                     <name>order</name>
2682                     <type>integer</type>
2683                     <notnull>true</notnull>
2684                     <default>0</default>
2685                 </field>
2686                 <field>
2687                     <name>created_by</name>
2688                     <type>text</type>
2689                     <length>40</length>
2690                 </field>
2691                 <field>
2692                     <name>creation_time</name>
2693                     <type>datetime</type>
2694                 </field>
2695                 <field>
2696                     <name>last_modified_by</name>
2697                     <type>text</type>
2698                     <length>40</length>
2699                 </field>
2700                 <field>
2701                     <name>last_modified_time</name>
2702                     <type>datetime</type>
2703                 </field>
2704                 <field>
2705                     <name>is_deleted</name>
2706                     <type>boolean</type>
2707                     <default>false</default>
2708                 </field>
2709                 <field>
2710                     <name>deleted_by</name>
2711                     <type>text</type>
2712                     <length>40</length>
2713                 </field>
2714                 <field>
2715                     <name>deleted_time</name>
2716                     <type>datetime</type>
2717                 </field>
2718                 <field>
2719                     <name>seq</name>
2720                     <type>integer</type>
2721                     <notnull>true</notnull>
2722                     <default>0</default>
2723                 </field>
2724                 <index>
2725                     <name>id</name>
2726                     <primary>true</primary>
2727                     <field>
2728                         <name>id</name>
2729                     </field>
2730                 </index>
2731                 <index>
2732                     <name>model-name-type</name>
2733                     <unique>true</unique>
2734                     <field>
2735                         <name>model</name>
2736                     </field>
2737                     <field>
2738                         <name>name</name>
2739                     </field>
2740                     <field>
2741                         <name>type</name>
2742                     </field>
2743                 </index>
2744                 <index>
2745                     <name>importexport_definitions::app_id--applications::id</name>
2746                     <field>
2747                         <name>application_id</name>
2748                     </field>
2749                     <foreign>true</foreign>
2750                     <reference>
2751                         <table>applications</table>
2752                         <field>id</field>
2753                         <!-- add onupdate/ondelete? -->
2754                     </reference>
2755                 </index>
2756             </declaration>
2757         </table>
2758         <table>
2759             <name>alarm</name>
2760             <version>3</version>
2761             <declaration>
2762                 <field>
2763                     <name>id</name>
2764                     <type>text</type>
2765                     <length>40</length>
2766                     <notnull>true</notnull>
2767                 </field>
2768                 <field>
2769                     <name>record_id</name>
2770                     <type>text</type>
2771                     <length>40</length>
2772                     <notnull>true</notnull>
2773                 </field>
2774                 <field>
2775                     <name>model</name>
2776                     <type>text</type>
2777                     <length>40</length>
2778                     <notnull>true</notnull>
2779                 </field>
2780                 <field>
2781                     <name>alarm_time</name>
2782                     <type>datetime</type>
2783                 </field>
2784                 <field>
2785                     <name>sent_time</name>
2786                     <type>datetime</type>
2787                 </field>
2788                 <field>
2789                     <name>sent_status</name>
2790                     <type>text</type>
2791                     <length>32</length>
2792                     <default>pending</default>
2793                     <notnull>true</notnull>
2794                 </field>
2795                 <field>
2796                     <name>sent_message</name>
2797                     <type>text</type>
2798                 </field>
2799                 <field>
2800                     <name>options</name>
2801                     <type>text</type>
2802                 </field>
2803                 <index>
2804                     <name>id</name>
2805                     <primary>true</primary>
2806                     <field>
2807                         <name>id</name>
2808                     </field>
2809                 </index>
2810                 <index>
2811                     <name>record_id-model</name>
2812                     <field>
2813                         <name>record_id</name>
2814                     </field>
2815                     <field>
2816                         <name>model</name>
2817                     </field>
2818                 </index>
2819             </declaration>
2820         </table>
2821         <table>
2822             <name>import</name>
2823             <version>2</version>
2824             <declaration>
2825                 <field>
2826                     <name>id</name>
2827                     <type>text</type>
2828                     <length>80</length>
2829                     <notnull>true</notnull>
2830                 </field>
2831                 <field>
2832                     <name>timestamp</name>
2833                     <type>datetime</type>
2834                 </field>
2835                 <field>
2836                     <name>user_id</name>
2837                     <type>text</type>
2838                     <length>80</length>
2839                     <notnull>true</notnull>
2840                 </field>
2841                 <field>
2842                     <name>model</name>
2843                     <type>text</type>
2844                     <length>80</length>
2845                     <notnull>true</notnull>
2846                 </field>
2847                 <field>
2848                     <name>application_id</name>
2849                     <type>text</type>
2850                     <length>80</length>
2851                     <notnull>true</notnull>
2852                 </field>
2853                 <field>
2854                     <name>synctoken</name>
2855                     <type>text</type>
2856                     <length>80</length>
2857                 </field>
2858                 <field>
2859                     <name>container_id</name>
2860                     <length>80</length>
2861                     <type>text</type>
2862                 </field>
2863                 <field>
2864                     <name>sourcetype</name>
2865                     <type>text</type>
2866                     <notnull>true</notnull>
2867                 </field>
2868                 <field>
2869                     <name>interval</name>
2870                     <type>text</type>
2871                 </field>
2872                 <field>
2873                     <name>source</name>
2874                     <type>text</type>
2875                 </field>
2876                 <field>
2877                     <name>options</name>
2878                     <type>text</type>
2879                 </field>
2880                 <field>
2881                     <name>failcount</name>
2882                     <type>integer</type>
2883                 </field>
2884                 <field>
2885                     <name>lastfail</name>
2886                     <type>text</type>
2887                 </field>
2888                 <index>
2889                     <name>id</name>
2890                     <primary>true</primary>
2891                     <field>
2892                         <name>id</name>
2893                     </field>
2894                 </index>
2895                 <field>
2896                     <name>created_by</name>
2897                     <type>text</type>
2898                     <length>40</length>
2899                 </field>
2900                 <field>
2901                     <name>creation_time</name>
2902                     <type>datetime</type>
2903                 </field>
2904                 <field>
2905                     <name>last_modified_by</name>
2906                     <type>text</type>
2907                     <length>40</length>
2908                 </field>
2909                 <field>
2910                     <name>last_modified_time</name>
2911                     <type>datetime</type>
2912                 </field>
2913                 <field>
2914                     <name>is_deleted</name>
2915                     <type>boolean</type>
2916                     <notnull>true</notnull>
2917                     <default>false</default>
2918                 </field>
2919                 <field>
2920                     <name>deleted_by</name>
2921                     <type>text</type>
2922                     <length>40</length>
2923                 </field>
2924                 <field>
2925                     <name>deleted_time</name>
2926                     <type>datetime</type>
2927                 </field>
2928                 <field>
2929                     <name>seq</name>
2930                     <type>integer</type>
2931                     <notnull>true</notnull>
2932                     <default>0</default>
2933                 </field>
2934                 <index>
2935                     <name>import::application_id--applications::id</name>
2936                     <field>
2937                         <name>application_id</name>
2938                     </field>
2939                     <foreign>true</foreign>
2940                     <reference>
2941                         <table>applications</table>
2942                         <field>id</field>
2943                     </reference>
2944                 </index>
2945                 <index>
2946                     <name>import::user_id--accounts::id</name>
2947                     <field>
2948                         <name>user_id</name>
2949                     </field>
2950                     <foreign>true</foreign>
2951                     <reference>
2952                         <table>accounts</table>
2953                         <field>id</field>
2954                     </reference>
2955                 </index>
2956             </declaration>
2957         </table>
2958         <table>
2959             <name>async_job</name>
2960             <version>3</version>
2961             <declaration>
2962                 <field>
2963                     <name>id</name>
2964                     <type>text</type>
2965                     <length>40</length>
2966                     <notnull>true</notnull>
2967                 </field>
2968                 <field>
2969                     <name>name</name>
2970                     <type>text</type>
2971                     <length>64</length>
2972                 </field>
2973                 <field>
2974                     <name>start_time</name>
2975                     <type>datetime</type>
2976                 </field>
2977                 <field>
2978                     <name>end_time</name>
2979                     <type>datetime</type>
2980                 </field>
2981                 <field>
2982                     <name>status</name>
2983                     <type>text</type>
2984                     <length>32</length>
2985                 </field>
2986                 <field>
2987                     <name>seq</name>
2988                     <type>integer</type>
2989                     <length>64</length>
2990                 </field>
2991                 <field>
2992                     <name>message</name>
2993                     <type>text</type>
2994                 </field>
2995                 <index>
2996                     <name>id</name>
2997                     <primary>true</primary>
2998                     <field>
2999                         <name>id</name>
3000                     </field>
3001                 </index>
3002                 <index>
3003                     <name>name-seq</name>
3004                     <unique>true</unique>
3005                     <field>
3006                         <name>name</name>
3007                     </field>
3008                     <field>
3009                         <name>seq</name>
3010                     </field>
3011                 </index>