"""update user model definations

Revision ID: ebd6acaf9989
Revises: b7ca8ba230d7
Create Date: 2025-02-10 09:44:39.087071

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "ebd6acaf9989"
down_revision = "b7ca8ba230d7"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    try:
        with op.batch_alter_table("admin_info", schema=None) as batch_op:
            batch_op.add_column(
                sa.Column(
                    "user_language",
                    sa.String(length=30),
                    nullable=True,
                    comment="user language",
                )
            )
    except Exception:
        pass

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("admin_info", schema=None) as batch_op:
        batch_op.drop_column("user_language")

    # ### end Alembic commands ###
