"""unread messeges

Revision ID: 89d1a07e95b5
Revises: 1f2381fd5a07
Create Date: 2022-01-24 12:09:15.727454

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '89d1a07e95b5'
down_revision = '1f2381fd5a07'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_chat_topic_unread_message', sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True),
                                                             nullable=False, server_default='now'))
    op.create_index(op.f('ix_cmf_chat_topic_unread_message_cmf_created_at'), 'cmf_chat_topic_unread_message', ['cmf_created_at'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    op.drop_index(op.f('ix_cmf_chat_topic_unread_message_cmf_created_at'), table_name='cmf_chat_topic_unread_message')
    op.drop_column('cmf_chat_topic_unread_message', 'cmf_created_at')
    # ### end Alembic commands ###
