diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-04-27 19:20:39 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-04-27 19:20:39 +0200 |
| commit | c59a52dacd1259fadb545c852883412e61f74c84 (patch) | |
| tree | e032cbd200c9041c2470197e008ae8d3b56932fb /check/app/models/sql_factory.py | |
| parent | 1db97e03f5cac4eb6421e0b55628a3187c41e29c (diff) | |
import script
Diffstat (limited to 'check/app/models/sql_factory.py')
| -rw-r--r-- | check/app/models/sql_factory.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/check/app/models/sql_factory.py b/check/app/models/sql_factory.py index ad27f62..1aa617c 100644 --- a/check/app/models/sql_factory.py +++ b/check/app/models/sql_factory.py @@ -31,7 +31,7 @@ class FileTable(Base): """Table for storing various hashes of images""" __tablename__ = 'files' id = Column(Integer, primary_key=True) - sha256 = Column(String(64, convert_unicode=True), nullable=False) + sha256 = Column(String(64, convert_unicode=True), nullable=False, unique=True) phash = Column(BigInteger, nullable=False, index=True) ext = Column(String(4, convert_unicode=True), nullable=False) url = Column(String(255, convert_unicode=True), nullable=False) |
