"""fix avatar url length [7497d2ff5731].

Revision ID: 7497d2ff5731
Revises: 0.90.0
Create Date: 2025-10-16 16:28:33.729565

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "7497d2ff5731"
down_revision = "0.90.0"
branch_labels = None
depends_on = None


def upgrade() -> None:
    """Upgrade database schema and/or data, creating a new revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("user", schema=None) as batch_op:
        batch_op.alter_column(
            "avatar_url",
            existing_type=sa.VARCHAR(),
            type_=sa.TEXT(),
            existing_nullable=True,
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade database schema and/or data back to the previous revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("user", schema=None) as batch_op:
        batch_op.alter_column(
            "avatar_url",
            existing_type=sa.TEXT(),
            type_=sa.VARCHAR(),
            existing_nullable=True,
        )

    # ### end Alembic commands ###
