db/db.sql
author terom
Sun, 04 May 2008 18:24:02 +0000
changeset 34 1fee720888c9
parent 32 cc2d9db311c0
permissions -rw-r--r--
...and add lib/dexif.py as well
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);