docs/db.sql
author Tero Marttila <terom@fixme.fi>
Sun, 14 Jun 2009 16:10:30 +0300
branchnew-exif
changeset 108 f74d8cf678ce
parent 41 3b1579a7bffb
permissions -rw-r--r--
relocate the new exif module to lib/, as it's not really part of degal as such
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);