BEGIN TRANSACTION;
CREATE TABLE library_info (name varchar(255), value varchar(255));
INSERT INTO "library_info" VALUES('name', 'SQLLite test 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('BSD book', 'test_packages/FreeBSD_Developers_Handbook.jar', 'Thout_1_0_jar', NULL, 2);
INSERT INTO "book" VALUES('BSD book2', 'test_packages/FreeBSD_Developers_Handbook/FreeBSDDevelopersHandbook.xml', 'Thout_1_0', NULL, 1);
INSERT INTO "book" VALUES('Sams Book', 'test_packages/osoft_Sams-Teach-Yourself-CGI-in-24-Hours-Second-Edition.jar', 'Thout_1_0_jar', NULL, 3);
INSERT INTO "book" VALUES('Quick Start', 'test_packages/QuickStartGuide.jar', 'Thout_1_0_jar', NULL, 4);
INSERT INTO "book" VALUES('Thout 1.0 Test', 'test_packages/0_jars/thout1_test.jar', 'Thout_1_0_jar', NULL, 5);
INSERT INTO "book" VALUES('Perl5', 'test_packages/osoft_9Perl5.8manual_en.jar', 'Thout_1_0_jar', NULL, 6);
CREATE INDEX library_info_name on library_info (name);
CREATE INDEX metadata_element_id on metadata_element (id, key);
COMMIT;
