"""messages summary from varchar to text

Revision ID: 4ab341a710f4
Revises: 0b4d9cb71c38
Create Date: 2024-09-06 09:56:42.404282

"""

from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "4ab341a710f4"
down_revision: Union[str, None] = "0b4d9cb71c38"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "messages", "summary", existing_type=sa.VARCHAR(length=255), type_=sa.Text(), existing_nullable=True
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "messages", "summary", existing_type=sa.Text(), type_=sa.VARCHAR(length=255), existing_nullable=True
    )
    # ### end Alembic commands ###
