some filesystems support mtime with nanosecond - store in FLOAT

This commit is contained in:
Vincent Riquer 2013-03-08 13:03:11 +01:00
parent 671a27988a
commit c4f0a2da8f

View File

@ -5,7 +5,7 @@ CREATE TABLE source_files (
size INTEGER NOT NULL, size INTEGER NOT NULL,
hash TEXT, hash TEXT,
mime_type INTEGER, mime_type INTEGER,
last_change INTEGER NOT NULL DEFAULT (strftime('%s','now')), last_change FLOAT 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) FOREIGN KEY (mime_type) REFERENCES mime_types(id)
ON DELETE SET NULL ON DELETE SET NULL
@ -17,7 +17,7 @@ CREATE TABLE destinations (
CREATE TABLE destination_files ( CREATE TABLE destination_files (
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
filename TEXT, filename TEXT,
last_change INTEGER NOT NULL DEFAULT 0, last_change FLOAT NOT NULL DEFAULT 0,
source_file_id INTEGER, source_file_id INTEGER,
destination_id INTEGER, destination_id INTEGER,
FOREIGN KEY (source_file_id) REFERENCES source_files(id) FOREIGN KEY (source_file_id) REFERENCES source_files(id)
@ -52,7 +52,7 @@ CREATE TABLE tags (
performer TEXT, performer TEXT,
rate INTEGER, rate INTEGER,
channels INTEGER, channels INTEGER,
last_change INTEGER, last_change FLOAT,
FOREIGN KEY (source_file) REFERENCES source_files(id) FOREIGN KEY (source_file) REFERENCES source_files(id)
ON DELETE CASCADE ON DELETE CASCADE
); );