"""Add column activate_alert

Revision ID: 86498a37f807
Revises: 50f7784e9243
Create Date: 2022-08-04 21:25:10.292302

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '86498a37f807'
down_revision = '50f7784e9243'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('balances', sa.Column('activate_alert', sa.Boolean(), nullable=True))
    op.execute("UPDATE balances SET activate_alert = FALSE")
    op.alter_column('balances', 'activate_alert', nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('balances', 'activate_alert')
    # ### end Alembic commands ###
