"""update trailing field lengths

Revision ID: 44c2e37ef899
Revises: cfb91e6aa9fc
Create Date: 2021-04-25 22:51:58.510197

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '44c2e37ef899'
down_revision = 'cfb91e6aa9fc'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('guest', 'name',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.Unicode(length=32),
               existing_nullable=True)
    op.alter_column('topic', 'title',
               existing_type=sa.VARCHAR(length=32),
               type_=sa.Unicode(length=128),
               existing_nullable=True)
    op.alter_column('trophy', 'name',
               existing_type=sa.TEXT(),
               type_=sa.Unicode(length=64),
               existing_nullable=True)
    op.alter_column('user', 'type',
               existing_type=sa.VARCHAR(length=20),
               type_=sa.String(length=30),
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user', 'type',
               existing_type=sa.String(length=30),
               type_=sa.VARCHAR(length=20),
               existing_nullable=True)
    op.alter_column('trophy', 'name',
               existing_type=sa.Unicode(length=64),
               type_=sa.TEXT(),
               existing_nullable=True)
    op.alter_column('topic', 'title',
               existing_type=sa.Unicode(length=128),
               type_=sa.VARCHAR(length=32),
               existing_nullable=True)
    op.alter_column('guest', 'name',
               existing_type=sa.Unicode(length=32),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    # ### end Alembic commands ###
