From c4f0a2da8f4ff6f69fed15197a317dcf54769065 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Fri, 8 Mar 2013 13:03:11 +0100 Subject: [PATCH] some filesystems support mtime with nanosecond - store in FLOAT --- share/schema.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/schema.sql b/share/schema.sql index 9a81919..31cd5c7 100644 --- a/share/schema.sql +++ b/share/schema.sql @@ -5,7 +5,7 @@ CREATE TABLE source_files ( size INTEGER NOT NULL, hash TEXT, 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')), FOREIGN KEY (mime_type) REFERENCES mime_types(id) ON DELETE SET NULL @@ -17,7 +17,7 @@ CREATE TABLE destinations ( CREATE TABLE destination_files ( id INTEGER PRIMARY KEY, filename TEXT, - last_change INTEGER NOT NULL DEFAULT 0, + last_change FLOAT NOT NULL DEFAULT 0, source_file_id INTEGER, destination_id INTEGER, FOREIGN KEY (source_file_id) REFERENCES source_files(id) @@ -52,7 +52,7 @@ CREATE TABLE tags ( performer TEXT, rate INTEGER, channels INTEGER, - last_change INTEGER, + last_change FLOAT, FOREIGN KEY (source_file) REFERENCES source_files(id) ON DELETE CASCADE );