summaryrefslogtreecommitdiff
path: root/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'db.py')
-rw-r--r--db.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/db.py b/db.py
index 762fc07..1deb196 100644
--- a/db.py
+++ b/db.py
@@ -27,12 +27,14 @@ class File(Base):
id = Column(Integer, primary_key = True)
hash = Column(String, unique = True, index = True)
+ file_hash = Column(String, unique = True, index = True)
filename = Column(String)
date = Column(DateTime)
user_id = Column(Integer, ForeignKey('users.id'), nullable = True)
- def __init__(self, hash, filename, date, user_id = None):
+ def __init__(self, hash, file_hash, filename, date, user_id = None):
self.hash = hash
+ self.file_hash = file_hash
self.filename = filename
self.date = date
self.user_id = user_id