"""increase_refresh_token_length

Revision ID: aa4689f80796
Revises: 21a19f0675f9
Create Date: 2025-07-06 10:54:19.714809

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "aa4689f80796"
down_revision: Union[str, None] = "21a19f0675f9"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "oauth_account",
        "refresh_token",
        existing_type=sa.VARCHAR(length=1024),
        type_=sa.String(length=4096),
        existing_nullable=True,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "oauth_account",
        "refresh_token",
        existing_type=sa.String(length=4096),
        type_=sa.VARCHAR(length=1024),
        existing_nullable=True,
    )
    # ### end Alembic commands ###
