refactor(database): rename migrations to make them more clear

This commit is contained in:
MingxuanGame
2025-09-14 05:56:01 +00:00
parent 66b5610dea
commit e591280620
36 changed files with 1 additions and 1 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 ###