From 632a65dbcb04671eaa58f48777dc80c6cde0647b Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 26 Feb 2013 13:53:31 +0100 Subject: [PATCH] add mime_types table --- share/schema.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/schema.sql b/share/schema.sql index be2888e..791d02f 100644 --- a/share/schema.sql +++ b/share/schema.sql @@ -4,8 +4,10 @@ CREATE TABLE source_files ( filename TEXT UNIQUE NOT NULL, size INTEGER NOT NULL, hash TEXT, + mime_type INTEGER, last_change INTEGER NOT NULL DEFAULT (strftime('%s','now')), - last_seen INTEGER NOT NULL DEFAULT (strftime('%s','now')) + last_seen INTEGER NOT NULL DEFAULT (strftime('%s','now')), + FOREIGN KEY (mime_type) REFERENCES mime_types(id) ); CREATE TABLE destinations ( id INTEGER PRIMARY KEY, @@ -20,6 +22,12 @@ CREATE TABLE destination_files ( FOREIGN KEY (source_file_id) REFERENCES source_files(id), FOREIGN KEY (destination_id) REFERENCES destinations(id) ); +CREATE TABLE mime_types ( + id INTEGER PRIMARY KEY, + destination_id INTEGER, + mime_text TEXT UNIQUE NOT NULL, + action INTEGER DEFAULT 1 +); CREATE INDEX sourcefiles_by_name ON source_files (filename,id);