add mime_types table
This commit is contained in:
parent
377e3f4eed
commit
632a65dbcb
@ -4,8 +4,10 @@ CREATE TABLE source_files (
|
|||||||
filename TEXT UNIQUE NOT NULL,
|
filename TEXT UNIQUE NOT NULL,
|
||||||
size INTEGER NOT NULL,
|
size INTEGER NOT NULL,
|
||||||
hash TEXT,
|
hash TEXT,
|
||||||
|
mime_type INTEGER,
|
||||||
last_change INTEGER NOT NULL DEFAULT (strftime('%s','now')),
|
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 (
|
CREATE TABLE destinations (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
@ -20,6 +22,12 @@ CREATE TABLE destination_files (
|
|||||||
FOREIGN KEY (source_file_id) REFERENCES source_files(id),
|
FOREIGN KEY (source_file_id) REFERENCES source_files(id),
|
||||||
FOREIGN KEY (destination_id) REFERENCES destinations(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);
|
CREATE INDEX sourcefiles_by_name ON source_files (filename,id);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user