Skip to content

Commit

Permalink
use name
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Oct 29, 2024
1 parent 34dbbf2 commit 988e67f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cacholote/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
association_table = sa.Table(
"association_table",
Base.metadata,
sa.Column("left_id", sa.ForeignKey("cache_entries.id"), primary_key=True),
sa.Column("right_id", sa.ForeignKey("cache_files.id"), primary_key=True),
sa.Column("cache_entries_id", sa.ForeignKey("cache_entries.id"), primary_key=True),
sa.Column("cache_files_name", sa.ForeignKey("cache_files.name"), primary_key=True),
)


Expand Down Expand Up @@ -82,7 +82,7 @@ def __repr__(self) -> str:
class CacheFile(Base):
__tablename__ = "cache_files"

id = sa.Column(sa.Integer(), primary_key=True)
name = sa.Column(sa.String(), primary_key=True)
cache_entries: sa.orm.Mapped[list[CacheEntry]] = sa.orm.relationship(
secondary=association_table, back_populates="cache_files"
)
Expand Down

0 comments on commit 988e67f

Please sign in to comment.