# pylint: disable=invalid-name
"""Remove single-jurisdiction flow

Revision ID: b5fcf654c681
Revises: e372310f31c1
Create Date: 2020-10-27 00:05:01.862834+00:00

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = "b5fcf654c681"
down_revision = "e372310f31c1"
branch_labels = None
depends_on = None


def upgrade():
    op.alter_column(
        "election",
        "organization_id",
        existing_type=sa.VARCHAR(length=200),
        nullable=False,
    )
    op.drop_column("election", "is_multi_jurisdiction")
    op.drop_column("election", "frozen_at")
    op.drop_column("round_contest", "sample_size_options")


def downgrade():  # pragma: no cover
    pass
    # # ### commands auto generated by Alembic - please adjust! ###
    # op.add_column(
    #     "round_contest",
    #     sa.Column(
    #         "sample_size_options",
    #         sa.VARCHAR(length=1000),
    #         autoincrement=False,
    #         nullable=True,
    #     ),
    # )
    # op.add_column(
    #     "election",
    #     sa.Column(
    #         "frozen_at", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
    #     ),
    # )
    # op.add_column(
    #     "election",
    #     sa.Column(
    #         "is_multi_jurisdiction", sa.BOOLEAN(), autoincrement=False, nullable=False
    #     ),
    # )
    # op.alter_column(
    #     "election",
    #     "organization_id",
    #     existing_type=sa.VARCHAR(length=200),
    #     nullable=True,
    # )
    # # ### end Alembic commands ###
