"""empty message

Revision ID: c343e4661d42
Revises: c3ba15e8f8e6
Create Date: 2021-06-17 20:05:37.828272

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'c343e4661d42'
down_revision = 'c3ba15e8f8e6'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('history',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('messageid', sa.Integer(), nullable=False),
    sa.Column('date', sa.DateTime(), nullable=True),
    sa.Column('chapter', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['messageid'], ['messages.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('messages', sa.Column('unread', sa.Boolean(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('messages', 'unread')
    op.drop_table('history')
    # ### end Alembic commands ###
