"""empty message

Revision ID: 23ea93cd533f
Revises: 728547616bf4
Create Date: 2020-10-14 17:28:13.983125

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '23ea93cd533f'
down_revision = '728547616bf4'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_u_work_chat_topic', sa.Column('last_comment_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_topic_last_comment_id'), 'cmf_u_work_chat_topic', ['last_comment_id'], unique=False)
    op.create_foreign_key(None, 'cmf_u_work_chat_topic', 'cmf_comment', ['last_comment_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'cmf_u_work_chat_topic', type_='foreignkey')
    op.drop_index(op.f('ix_cmf_u_work_chat_topic_last_comment_id'), table_name='cmf_u_work_chat_topic')
    op.drop_column('cmf_u_work_chat_topic', 'last_comment_id')
    # ### end Alembic commands ###
