feat(beatmap,score): support failtime & more exact playtime

This commit is contained in:
MingxuanGame
2025-08-18 08:48:13 +00:00
parent 9ee087306b
commit 219f19d623
9 changed files with 279 additions and 27 deletions

View File

@@ -0,0 +1,44 @@
"""beatmap: add failtime
Revision ID: 2fcfc28846c1
Revises: 2dcd04d3f4dc
Create Date: 2025-08-18 06:06:30.929740
"""
from __future__ import annotations
from collections.abc import Sequence
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "2fcfc28846c1"
down_revision: str | Sequence[str] | None = "2dcd04d3f4dc"
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.create_table(
"failtime",
sa.Column("beatmap_id", sa.Integer(), nullable=False),
sa.Column("exit", sa.VARBINARY(length=400), nullable=False),
sa.Column("fail", sa.VARBINARY(length=400), nullable=False),
sa.ForeignKeyConstraint(
["beatmap_id"],
["beatmaps.id"],
),
sa.PrimaryKeyConstraint("beatmap_id"),
)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("failtime")
# ### end Alembic commands ###