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,7 +31,9 @@ def upgrade() -> None:
)
# Remove the DB-level default — ORM model provides Python-level default
op.alter_column("configs", "download_token", server_default=None)
op.create_index("ix_configs_download_token", "configs", ["download_token"])
def downgrade() -> None:
op.drop_index("ix_configs_download_token", table_name="configs")
op.drop_column("configs", "download_token")