
terom@32: CREATE TABLE 'nodes' (id INTEGER NOT NULL PRIMARY KEY, dirpath TEXT NOT NULL, filename TEXT NOT NULL);
terom@32: CREATE TABLE tags (image INTEGER NOT NULL, type TEXT, tag TEXT NOT NULL);
terom@32: CREATE VIEW images AS SELECT id, dirpath, filename FROM nodes WHERE filename != '';
terom@32: CREATE UNIQUE INDEX tags_unique_image_type ON tags (image, type);
terom@32: CREATE UNIQUE INDEX tags_unique_image_type_tag ON tags (image, type, tag);




