diff options
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |