CREATE TABLE meta (
				id		INTEGER PRIMARY KEY NOT NULL,
				name		TEXT UNIQUE NOT NULL,
				data		TEXT
			);
INSERT INTO "meta" VALUES(1,'F-Spot Version','0.4.0');
INSERT INTO "meta" VALUES(2,'F-Spot Database Version','8');
INSERT INTO "meta" VALUES(3,'Hidden Tag Id','2');
CREATE TABLE tags (                               	id            INTEGER PRIMARY KEY NOT NULL,       name          TEXT UNIQUE,                        category_id   INTEGER,			          is_category   BOOLEAN,			          sort_priority INTEGER,			          icon          TEXT			   );
INSERT INTO "tags" VALUES(1,'Favorites',0,1,-10,'R2RrUAA');
INSERT INTO "tags" VALUES(2,'Hidden',0,0,-9,'R2RrUAAA');
INSERT INTO "tags" VALUES(3,'People',0,1,-8,'R2RrUAAA');
INSERT INTO "tags" VALUES(4,'Places',0,1,-8,'R2RrUAAA');
INSERT INTO "tags" VALUES(5,'Events',0,1,-7,'R2RrUAAA');
INSERT INTO "tags" VALUES(6,'tmp',3,1,0,'R2RrUAAA');
INSERT INTO "tags" VALUES(7,'subtmp',6,1,0,'R2RrUAAA');

CREATE TABLE photo_tags (     	photo_id      INTEGER,        tag_id        INTEGER  );
INSERT INTO "photo_tags" VALUES(23,6);
INSERT INTO "photo_tags" VALUES(25,6);
INSERT INTO "photo_tags" VALUES(10,6);
INSERT INTO "photo_tags" VALUES(20,3);
INSERT INTO "photo_tags" VALUES(22,7);
INSERT INTO "photo_tags" VALUES(18,7);
INSERT INTO "photo_tags" VALUES(19,7);

CREATE TABLE exports (
				id		 INTEGER PRIMARY KEY NOT NULL,
                                image_id         INTEGER NOT NULL,
                                image_version_id INTEGER NOT NULL,
                                export_type      TEXT NOT NULL,
                                export_token     TEXT NOT NULL
			);

CREATE TABLE rolls (                                     	id                 INTEGER PRIMARY KEY NOT NULL,          time               INTEGER NOT NULL	   	   );
CREATE TABLE jobs (
				id		 INTEGER PRIMARY KEY NOT NULL,
				job_type         TEXT NOT NULL,
                                job_options      TEXT NOT NULL,
                                run_at           INTEGER,
				job_priority     INTEGER NOT NULL
			);
CREATE TABLE photos (
	id                 INTEGER PRIMARY KEY NOT NULL,
       time               INTEGER NOT NULL,
       uri                STRING NOT NULL,
       description        TEXT NOT NULL,
       roll_id            INTEGER NOT NULL,
       default_version_id INTEGER NOT NULL);
INSERT INTO "photos" VALUES(1,1043862200,'file:///home/phil/Photos/2003/1/29/cat.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(2,1050773964,'file:///home/phil/Photos/2003/4/19/chicken.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(3,1001508995,'file:///home/phil/Photos/2001/9/26/dogs.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(4,982419384,'file:///home/phil/Photos/2001/2/17/duck.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(5,1043862832,'file:///home/phil/Photos/2003/1/29/hippo.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(6,1021100081,'file:///home/phil/Photos/2002/5/11/horse.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(7,1017672531,'file:///home/phil/Photos/2002/4/1/lambs.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(9,1081348590,'file:///home/phil/Photos/2004/4/7/penguins.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(10,1091169763,'file:///home/phil/Photos/2004/7/30/rabbit.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(11,1029047047,'file:///home/phil/Photos/2002/8/11/swan.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(16,1043862200,'file:///home/phil/Photos/2003/1/29/cat.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(17,1050773964,'file:///home/phil/Photos/2003/4/19/chicken.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(18,1001508995,'file:///home/phil/Photos/2001/9/26/dogs.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(19,982419384,'file:///home/phil/Photos/2001/2/17/duck.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(20,1043862832,'file:///home/phil/Photos/2003/1/29/hippo.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(21,1021100081,'file:///home/phil/Photos/2002/5/11/horse.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(22,1017672531,'file:///home/phil/Photos/2002/4/1/lambs.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(23,1156237654,'file:///home/phil/Photos/2006/8/22/leopard.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(24,1081348590,'file:///home/phil/Photos/2004/4/7/penguins.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(25,1091169763,'file:///home/phil/Photos/2004/7/30/rabbit.jpg','                                    ',0,1);
INSERT INTO "photos" VALUES(26,1029047047,'file:///home/phil/Photos/2002/8/11/swan.jpg','                                    ',0,1);
