"""add song table

迁移 ID: f273db8f9707
父迁移: 82115b280b5c
创建时间: 2025-11-04 11:17:10.623690

"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = "f273db8f9707"
down_revision: str | Sequence[str] | None = "82115b280b5c"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "nonebot_plugin_rikka_maisong",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("title", sa.String(), nullable=False),
        sa.Column("artist", sa.String(), nullable=False),
        sa.Column("genre", sa.String(), nullable=False),
        sa.Column("bpm", sa.Integer(), nullable=False),
        sa.Column("map", sa.String(), nullable=True),
        sa.Column("version", sa.Integer(), nullable=False),
        sa.Column("locked", sa.Boolean(), nullable=True),
        sa.Column("disabled", sa.Boolean(), nullable=True),
        sa.Column("difficulties", sa.String(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_nonebot_plugin_rikka_maisong")),
        info={"bind_key": "nonebot_plugin_rikka"},
    )
    # ### end Alembic commands ###


def downgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("nonebot_plugin_rikka_maisong")
    # ### end Alembic commands ###
