"""fix login

Revision ID: 974fdd3bef68
Revises: 73dc72cac582
Create Date: 2022-11-15 09:36:35.154741

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '974fdd3bef68'
down_revision = '73dc72cac582'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_auth', 'login',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_auth', 'email',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_chat_message', 'cache_cmf_author_login',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_comment', 'cache_cmf_author_login',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_company', 'email1',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_company', 'email2',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_license', 'user_name',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_person', 'login',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_person', 'deleted_login',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_person', 'email',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    op.alter_column('cmf_role', 'email',
               existing_type=sa.VARCHAR(length=64),
               type_=sa.String(length=4096),
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_role', 'email',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_person', 'email',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_person', 'deleted_login',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_person', 'login',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_license', 'user_name',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_company', 'email2',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_company', 'email1',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_comment', 'cache_cmf_author_login',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_chat_message', 'cache_cmf_author_login',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_auth', 'email',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    op.alter_column('cmf_auth', 'login',
               existing_type=sa.String(length=4096),
               type_=sa.VARCHAR(length=64),
               existing_nullable=True)
    # ### end Alembic commands ###
