"""增加平台类型

迁移 ID: 3fc264ad0bb7
父迁移: f9c6a7111d67
创建时间: 2025-08-05 18:20:39.625140

"""
from __future__ import annotations

from collections.abc import Sequence

from alembic import op
import sqlalchemy as sa
from sqlalchemy import text


revision: str = '3fc264ad0bb7'
down_revision: str | Sequence[str] | None = 'f9c6a7111d67'
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_delta_helper_userdata', schema=None) as batch_op:
        batch_op.add_column(sa.Column('platform', sa.String(), nullable=False, server_default=text('qq')))

    # ### 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_delta_helper_userdata', schema=None) as batch_op:
        batch_op.drop_column('platform')

    # ### end Alembic commands ###
