Skip to content

Commit

Permalink
Add a python model for item hashes. See #452
Browse files Browse the repository at this point in the history
  • Loading branch information
breyten committed Jan 18, 2024
1 parent eb6a45e commit c09f76d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ocd_backend/models/postgres_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
Base = declarative_base()


class ItemHash(Base):
__tablename__ = 'item_hash'

id = Column(BigInteger, Sequence('source_id_seq'), primary_key=True, index=True)
item_id = Column(String, nullable=False, index=True, unique=True)
item_hash = Column(String, nullable=False)

class Source(Base):
__tablename__ = 'source'

Expand Down

0 comments on commit c09f76d

Please sign in to comment.