From c59a52dacd1259fadb545c852883412e61f74c84 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 27 Apr 2019 19:20:39 +0200 Subject: import script --- check/app/models/sql_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check/app/models/sql_factory.py') 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) -- cgit v1.2.3-70-g09d2