Created
June 20, 2017 15:00
-
-
Save wttw/68331db0571a5b8adbc25326042ed182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Using text, for ease of working with: | |
CREATE TABLE file_hash ( | |
hash_id integer PRIMARY KEY, | |
file_id integer REFERENCES file, | |
md5 text UNIQUE, | |
sha1 text UNIQUE, | |
photodna text UNIQUE | |
); | |
-- Using bytea, for space and speed benefits: | |
CREATE TABLE file_hash ( | |
hash_id integer PRIMARY KEY, | |
file_id integer REFERENCES file, | |
md5 bytea UNIQUE, | |
sha1 bytea UNIQUE, | |
photodna bytea UNIQUE | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment