docs/db.sql
author Tero Marttila <terom@fixme.fi>
Thu, 11 Jun 2009 21:46:09 +0300
changeset 93 d3872a673fbe
parent 41 3b1579a7bffb
permissions -rw-r--r--
fix File.newer_than/File.older_than to correctly handle None
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);