# pylint: disable=invalid-name
"""BallotInterpretation.has_invalid_write_in

Revision ID: 34939a0c9f5c
Revises: 5004a93f75d8
Create Date: 2022-09-02 15:57:58.017885+00:00

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "34939a0c9f5c"
down_revision = "5004a93f75d8"
branch_labels = None
depends_on = None


def upgrade():
    op.add_column(
        "ballot_interpretation", sa.Column("has_invalid_write_in", sa.Boolean()),
    )
    op.execute("UPDATE ballot_interpretation SET has_invalid_write_in = false")
    op.alter_column("ballot_interpretation", "has_invalid_write_in", nullable=False)


def downgrade():  # pragma: no cover
    pass
    # ### commands auto generated by Alembic - please adjust! ###
    # op.drop_column('ballot_interpretation', 'has_invalid_write_in')
    # ### end Alembic commands ###
