1CREATE TABLE connections (
2    id integer primary key asc,
3    uri text,
4    displayname text,
5    synctoken integer,
6    description text,
7    username text,
8    password text,
9    dwuser text,
10    type text,
11    syncinterval integer,
12    lastsynced integer,
13    ctag text,
14    active integer,
15    write integer
16);
17
18CREATE TABLE calendarobjects (
19    id integer primary key asc,
20    calendardata blob,
21    uri text,
22    calendarid integer,
23    lastmodified integer,
24    etag text,
25    size integer,
26    componenttype text,
27    firstoccurence integer,
28    lastoccurence integer,
29    uid text
30);
31
32CREATE TABLE calendarchanges (
33    id integer primary key asc,
34    uri text,
35    synctoken integer,
36    calendarid integer,
37    operation integer
38);
39
40CREATE INDEX calendarid_synctoken ON calendarchanges (calendarid, synctoken);
41
42CREATE TABLE addressbookobjects (
43    id integer primary key asc,
44    contactdata blob,
45    uri text,
46    addressbookid integer,
47    lastmodified integer,
48    etag text,
49    size integer,
50    formattedname text,
51    structuredname text
52);
53
54CREATE TABLE addressbookchanges (
55    id integer primary key asc,
56    uri text,
57    synctoken integer,
58    addressbookid integer,
59    operation integer
60);
61
62CREATE INDEX addressbookid_synctoken ON addressbookchanges (addressbookid, synctoken);
63