"""Adding user active attribute Revision ID: 7c2d43ec9c84 Revises: 374c36260db7 Create Date: 2018-06-10 17:57:32.570036 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7c2d43ec9c84' down_revision = '374c36260db7' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('users', sa.Column('active', sa.Boolean())) op.execute('UPDATE users SET active = True') op.alter_column('users', 'active', nullable=False) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column('users', 'active') # ### end Alembic commands ###