"""book table add read, update repr

Revision ID: cbd8a2d8f774
Revises: 4956f598a487
Create Date: 2020-07-18 10:26:49.754262

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'cbd8a2d8f774'
down_revision = '4956f598a487'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('book', sa.Column('read', sa.Boolean(), nullable=True))
    op.create_index(op.f('ix_book_read'), 'book', ['read'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_book_read'), table_name='book')
    op.drop_column('book', 'read')
    # ### end Alembic commands ###
