feat(team): add playmode, description, website and statistics

This commit is contained in:
MingxuanGame
2025-10-08 05:46:17 +00:00
parent e2f3c5099f
commit 45ed9e51a9
4 changed files with 176 additions and 10 deletions

View File

@@ -0,0 +1,43 @@
"""team: add description, playmode and website
Revision ID: 48fb754416de
Revises: fa4952dc70df
Create Date: 2025-10-08 05:26:13.832105
"""
from collections.abc import Sequence
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "48fb754416de"
down_revision: str | Sequence[str] | None = "fa4952dc70df"
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.add_column("teams", sa.Column("description", sa.Text(), nullable=True))
op.add_column(
"teams",
sa.Column(
"playmode",
sa.Enum("OSU", "TAIKO", "FRUITS", "MANIA", "OSURX", "OSUAP", "TAIKORX", "FRUITSRX", name="gamemode"),
nullable=False,
),
)
op.add_column("teams", sa.Column("website", sa.Text(), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("teams", "website")
op.drop_column("teams", "playmode")
op.drop_column("teams", "description")
# ### end Alembic commands ###