"""add divingfish support

迁移 ID: fb6275585c59
父迁移: f273db8f9707
创建时间: 2025-11-13 23:24:32.203810

"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = "fb6275585c59"
down_revision: str | Sequence[str] | None = "f273db8f9707"
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! ###
    with op.batch_alter_table("nonebot_plugin_rikka_userbindinfo", schema=None) as batch_op:
        batch_op.add_column(sa.Column("diving_fish_import_token", sa.String(), nullable=True))
        batch_op.add_column(sa.Column("diving_fish_username", sa.String(), nullable=True))

    # ### end Alembic commands ###


def downgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("nonebot_plugin_rikka_userbindinfo", schema=None) as batch_op:
        batch_op.drop_column("diving_fish_username")
        batch_op.drop_column("diving_fish_import_token")

    # ### end Alembic commands ###
