"""add 'favorite' on Article table

Revision ID: 73ab306aefac
Revises: 9b52e07d1b4b
Create Date: 2019-11-24 18:32:10.663016

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '73ab306aefac'
down_revision = '9b52e07d1b4b'
branch_labels = None
depends_on = None


def upgrade():
    with op.batch_alter_table('articles', schema=None) as batch_op:
        batch_op.add_column(
            sa.Column('favorite', sa.Boolean(), server_default='0',
                      nullable=False))


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('articles', schema=None) as batch_op:
        batch_op.drop_column('favorite')
    # ### end Alembic commands ###
