BEGIN TRANSACTION;
CREATE TABLE library_info (name varchar(255), value varchar(255));
INSERT INTO "library_info" VALUES('name', 'Default Library');
INSERT INTO "library_info" VALUES('type', 'SQLite based library');
CREATE TABLE metadata_element (id bigint, key varchar(255), value varchar(255));
INSERT INTO "metadata_element" VALUES(7, ' type', ' test');
INSERT INTO "metadata_element" VALUES(8, ' type', ' test');
INSERT INTO "metadata_element" VALUES(8, ' color', ' green');
INSERT INTO "metadata_element" VALUES(9, ' height', ' 15');
INSERT INTO "metadata_element" VALUES(9, ' type', ' worthless');
INSERT INTO "metadata_element" VALUES(10, ' weight', ' 12');
INSERT INTO "metadata_element" VALUES(10, ' height', ' 15');
INSERT INTO "metadata_element" VALUES(10, ' type', ' worthless');
CREATE TABLE metadata (id integer primary key, type varchar(255), name varchar(255));
INSERT INTO "metadata" VALUES(1, 'test', 'test');
INSERT INTO "metadata" VALUES(2, 'generic', ' foo');
INSERT INTO "metadata" VALUES(3, 'generic', ' foo');
INSERT INTO "metadata" VALUES(4, 'generic', ' foo');
INSERT INTO "metadata" VALUES(5, 'generic', ' foo');
INSERT INTO "metadata" VALUES(6, 'generic', ' foo');
INSERT INTO "metadata" VALUES(7, 'generic', ' foo');
INSERT INTO "metadata" VALUES(8, 'generic', ' bar');
INSERT INTO "metadata" VALUES(9, 'generic', ' blah');
INSERT INTO "metadata" VALUES(10, 'generic', ' blah');
CREATE TABLE book (title varchar(255), URI varchar(255), type varchar(255), icon blob, ordering integer primary key);
INSERT INTO "book" VALUES('Quick Start', 'default_library/QuickStartGuide.jar', 'Thout_1_0_jar', NULL, 1);
INSERT INTO "book" VALUES('BSD book', 'default_library/FreeBSD_Developers_Handbook.jar', 'Thout_1_0_jar', NULL, 2);
CREATE INDEX library_info_name on library_info (name);
CREATE INDEX metadata_element_id on metadata_element (id, key);
COMMIT;
