1CREATE TABLE addressbooks (
2    id integer primary key asc NOT NULL,
3    principaluri text NOT NULL,
4    displayname text,
5    uri text NOT NULL,
6    description text,
7    synctoken integer DEFAULT 1 NOT NULL
8);
9
10CREATE TABLE cards (
11    id integer primary key asc NOT NULL,
12    addressbookid integer NOT NULL,
13    carddata blob,
14    uri text NOT NULL,
15    lastmodified integer,
16    etag text,
17    size integer
18);
19
20CREATE TABLE addressbookchanges (
21    id integer primary key asc NOT NULL,
22    uri text,
23    synctoken integer NOT NULL,
24    addressbookid integer NOT NULL,
25    operation integer NOT NULL
26);
27
28CREATE INDEX addressbookid_synctoken ON addressbookchanges (addressbookid, synctoken);
29