Skip to content

Commit

Permalink
add index from #642 to alembic state
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed May 21, 2024
1 parent bdf1093 commit 54299f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions alembic/versions/158030827560_base_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ def upgrade() -> None:
op.create_index("scores_score_index", "scores", ["score"], unique=False)
op.create_index("scores_status_index", "scores", ["status"], unique=False)
op.create_index("scores_userid_index", "scores", ["userid"], unique=False)
op.create_index(
"scores_fetch_leaderboard_generic_index",
"scores",
["map_md5", "status", "mode"],
unique=False,
)
op.create_table(
"stats",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
Expand Down Expand Up @@ -521,6 +527,7 @@ def downgrade() -> None:
op.drop_index("stats_pp_index", table_name="stats")
op.drop_index("stats_mode_index", table_name="stats")
op.drop_table("stats")
op.drop_index("scores_fetch_leaderboard_generic_index", table_name="scores")
op.drop_index("scores_userid_index", table_name="scores")
op.drop_index("scores_status_index", table_name="scores")
op.drop_index("scores_score_index", table_name="scores")
Expand Down
1 change: 1 addition & 0 deletions app/repositories/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class ScoresTable(Base):
Index("scores_play_time_index", play_time),
Index("scores_userid_index", userid),
Index("scores_online_checksum_index", online_checksum),
Index("scores_fetch_leaderboard_generic_index", map_md5, status, mode),
)


Expand Down

0 comments on commit 54299f8

Please sign in to comment.