"""empty message

Revision ID: e902da0ec343
Revises: 15d91ee8a764
Create Date: 2020-10-30 15:36:01.156536

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e902da0ec343'
down_revision = '15d91ee8a764'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_u_work_chat_group', sa.Column('cache_last_comment_text', sa.TEXT(), nullable=True))
    op.add_column('cmf_u_work_chat_group', sa.Column('cache_last_topic_code', sa.String(length=64), nullable=True))
    op.add_column('cmf_u_work_chat_group', sa.Column('cache_last_topic_name', sa.String(length=256), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_group_cache_last_topic_code'), 'cmf_u_work_chat_group', ['cache_last_topic_code'], unique=True)
    op.create_index(op.f('ix_cmf_u_work_chat_group_cache_last_topic_name'), 'cmf_u_work_chat_group', ['cache_last_topic_name'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_u_work_chat_group_cache_last_topic_name'), table_name='cmf_u_work_chat_group')
    op.drop_index(op.f('ix_cmf_u_work_chat_group_cache_last_topic_code'), table_name='cmf_u_work_chat_group')
    op.drop_column('cmf_u_work_chat_group', 'cache_last_topic_name')
    op.drop_column('cmf_u_work_chat_group', 'cache_last_topic_code')
    op.drop_column('cmf_u_work_chat_group', 'cache_last_comment_text')
    # ### end Alembic commands ###
