summaryrefslogtreecommitdiffstats
path: root/components/test/data/history/thumbnail_wild/Favicons.corrupt_meta.disable
blob: 05e46efd23020b000d7f6f8ced91a3bdbaec6331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- unit_tests --gtest_filter=ThumbnailDatabaseTest.WildSchema
--
-- [meta] table has first column [oey] instead of [key] (single-bit
-- error).  Database consistent with v6, but that may just mean that
-- v6 code was when attempting to work with an empty database with a
-- broken [meta] table.  Multiple reports from the same clientid have
-- seen this, so the broken [meta] is almost certainly on disk.
--
-- TODO(shess): This is clearly low-priority BUT the general class of
-- problem where the schema is wrong should be handled.  I suspect the
-- final solution will be to Raze() if the database contains [meta]
-- but the version cannot be fetched from it, or failing some other
-- validity metric.
BEGIN TRANSACTION;

CREATE TABLE meta(oey LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);

CREATE TABLE "favicons" (id INTEGER PRIMARY KEY,url LONGVARCHAR NOT NULL,icon_type INTEGER DEFAULT 1,sizes LONGVARCHAR);
CREATE INDEX favicons_url ON favicons(url);

CREATE TABLE icon_mapping(id INTEGER PRIMARY KEY,page_url LONGVARCHAR NOT NULL,icon_id INTEGER);
CREATE INDEX icon_mapping_icon_id_idx ON icon_mapping(icon_id);
CREATE INDEX icon_mapping_page_url_idx ON icon_mapping(page_url);

CREATE TABLE favicon_bitmaps(id INTEGER PRIMARY KEY,icon_id INTEGER NOT NULL,last_updated INTEGER DEFAULT 0,image_data BLOB,width INTEGER DEFAULT 0,height INTEGER DEFAULT 0);
CREATE INDEX favicon_bitmaps_icon_id ON favicon_bitmaps(icon_id);

COMMIT;