"""empty message

Revision ID: 9fb0c5d3a987
Revises: 04a15bfd9b21
Create Date: 2021-09-27 11:29:34.559252

"""
import datetime

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '9fb0c5d3a987'
down_revision = '04a15bfd9b21'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('channel', sa.Column('last_post_sent', sa.DateTime(), nullable=True))
    last_post_sent = sa.table('channel', sa.column('last_post_sent'))
    op.execute(last_post_sent.update().values(last_post_sent=datetime.datetime.min))
    op.alter_column('channel', 'last_post_sent', nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('channel', 'last_post_sent')
    # ### end Alembic commands ###
