feat(score): support osu-rx & osu-ap & all beatmap leaderboard like osu.ppy.sb
This commit is contained in:
116
migrations/versions/19cdc9ce4dcb_gamemode_add_osurx_osupp.py
Normal file
116
migrations/versions/19cdc9ce4dcb_gamemode_add_osurx_osupp.py
Normal file
@@ -0,0 +1,116 @@
|
||||
"""gamemode: add osurx & osupp
|
||||
|
||||
Revision ID: 19cdc9ce4dcb
|
||||
Revises: fdb3822a30ba
|
||||
Create Date: 2025-08-10 06:10:08.093591
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "19cdc9ce4dcb"
|
||||
down_revision: str | Sequence[str] | None = "fdb3822a30ba"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column(
|
||||
"lazer_users",
|
||||
"playmode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"beatmaps",
|
||||
"mode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"lazer_user_statistics",
|
||||
"mode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"score_tokens",
|
||||
"ruleset_id",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"best_scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
op.alter_column(
|
||||
"total_score_best_scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum(
|
||||
"OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", name="gamemode"
|
||||
),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column(
|
||||
"total_score_best_scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"best_scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"scores",
|
||||
"gamemode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"score_tokens",
|
||||
"ruleset_id",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"lazer_user_statistics",
|
||||
"mode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"beatmaps",
|
||||
"mode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
op.alter_column(
|
||||
"lazer_users",
|
||||
"playmode",
|
||||
type_=sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", name="gamemode"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user