feat: add index on configs.download_token for token-auth lookups

This commit is contained in:
2026-03-01 16:01:57 +01:00
parent e9a91a7794
commit 9b15c081b0
2 changed files with 3 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ class Config(Base):
download_token: Mapped[str] = mapped_column(
String(64),
nullable=False,
index=True,
default=lambda: secrets.token_urlsafe(32),
)
owner_id: Mapped[int] = mapped_column(Integer, ForeignKey("users.id"), nullable=False)