1 -- unit_tests --gtest_filter=ThumbnailDatabaseTest.WildSchema
3 -- Based on version 5 schema found in the wild by error diagnostics.
4 -- The schema failed migrations because of an unexpected
5 -- [temp_favicons] table (see http://crbug.com/272519 ).
7 -- Init() has been modified to drop these tables before migration.
10 -- [meta] is expected.
11 CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,value LONGVARCHAR);
12 INSERT INTO "meta" VALUES('version','5');
13 INSERT INTO "meta" VALUES('last_compatible_version','5');
15 -- This version of [favicons] is consistent with v5.
16 CREATE TABLE "favicons"(id INTEGER PRIMARY KEY,url LONGVARCHAR NOT NULL,last_updated INTEGER DEFAULT 0,image_data BLOB,icon_type INTEGER DEFAULT 1,sizes LONGVARCHAR);
17 CREATE INDEX favicons_url ON favicons(url);
19 -- [icon_mapping] consistent with v5.
20 CREATE TABLE icon_mapping(id INTEGER PRIMARY KEY,page_url LONGVARCHAR NOT NULL,icon_id INTEGER);
21 CREATE INDEX icon_mapping_icon_id_idx ON icon_mapping(icon_id);
22 CREATE INDEX icon_mapping_page_url_idx ON icon_mapping(page_url);
24 -- [favicon_bitmaps] is a v6 table created by Init() before version
25 -- check. This probably is only in memory (not committed).
26 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);
27 CREATE INDEX favicon_bitmaps_icon_id ON favicon_bitmaps(icon_id);
29 -- Presence of these tables is consistent with an aborted attempt to
30 -- clear history. Prior to r217993, that code was not contained in a
31 -- transaction (or possibly there was a non-atomic update).
32 CREATE TABLE temp_favicons(id INTEGER PRIMARY KEY,url LONGVARCHAR NOT NULL,last_updated INTEGER DEFAULT 0,image_data BLOB,icon_type INTEGER DEFAULT 1,sizes LONGVARCHAR);
33 CREATE TABLE temp_icon_mapping(id INTEGER PRIMARY KEY,page_url LONGVARCHAR NOT NULL,icon_id INTEGER);