diff options
-rw-r--r-- | initialize.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/initialize.sql b/initialize.sql index 84a37a9..3df2d49 100644 --- a/initialize.sql +++ b/initialize.sql @@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS image( thumbw INTEGER, -- cached thumbnail width, if known thumbh INTEGER, -- cached thumbnail height, if known dhash INTEGER, -- uint64 perceptual hash as a signed integer + CHECK (unhex(sha1) IS NOT NULL AND lower(sha1) = sha1), PRIMARY KEY (sha1) ) STRICT; |