"""Add active field to tasks Revision ID: 719f2d1539c8 Revises: ac2bd309d20c Create Date: 2020-05-20 13:01:33.239007 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '719f2d1539c8' down_revision = 'ac2bd309d20c' branch_labels = None depends_on = None def upgrade(): with op.batch_alter_table('tasks') as tasks: tasks.add_column( sa.Column( 'active', sa.Boolean, server_default=sa.sql.expression.true(), nullable=False ) ) def downgrade(): with op.batch_alter_table('tasks') as tasks: tasks.drop_column('active')