
diff -r 373392025533 -r 3b1579a7bffb docs/db.sql
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/db.sql	Wed Jun 03 19:03:28 2009 +0300
@@ -0,0 +1,5 @@
+CREATE TABLE 'nodes' (id INTEGER NOT NULL PRIMARY KEY, dirpath TEXT NOT NULL, filename TEXT NOT NULL);
+CREATE TABLE tags (image INTEGER NOT NULL, type TEXT, tag TEXT NOT NULL);
+CREATE VIEW images AS SELECT id, dirpath, filename FROM nodes WHERE filename != '';
+CREATE UNIQUE INDEX tags_unique_image_type ON tags (image, type);
+CREATE UNIQUE INDEX tags_unique_image_type_tag ON tags (image, type, tag);




