3 CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,value LONGVARCHAR);
4 INSERT INTO "meta" VALUES('version','21');
5 INSERT INTO "meta" VALUES('last_compatible_version','16');
7 -- Create old androi_urls table
8 CREATE TABLE android_urls(id INTEGER PRIMARY KEY, raw_url LONGVARCHAR, created_time INTEGER NOT NULL, last_visit_time INTEGER NOT NULL, url_id INTEGER NOT NULL,favicon_id INTEGER DEFAULT NULL, bookmark INTEGER DEFAULT 0);
9 CREATE INDEX android_urls_raw_url_idx ON android_urls(raw_url);
10 CREATE INDEX android_urls_url_id_idx ON android_urls(url_id);
11 INSERT INTO "android_urls" VALUES(1,'http://google.com/',1,1,1,1,0);
12 INSERT INTO "android_urls" VALUES(4,'www.google.com/',1,1,3,1,1);
14 -- Create downloads table in proper (old) format.
15 CREATE TABLE downloads (
16 id INTEGER PRIMARY KEY,
17 full_path LONGVARCHAR NOT NULL,
18 url LONGVARCHAR NOT NULL,
19 start_time INTEGER NOT NULL,
20 received_bytes INTEGER NOT NULL,
21 total_bytes INTEGER NOT NULL,
22 state INTEGER NOT NULL,
23 end_time INTEGER NOT NULL,
24 opened INTEGER NOT NULL);