# pylint: disable=invalid-name
"""Batch.container

Revision ID: e372310f31c1
Revises: 5acbd2f95b9f
Create Date: 2020-10-14 18:55:22.781217+00:00

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    op.add_column("batch", sa.Column("container", sa.String(length=200), nullable=True))
    op.create_unique_constraint(
        op.f("batch_jurisdiction_id_tabulator_name_key"),
        "batch",
        ["jurisdiction_id", "tabulator", "name"],
    )
    op.drop_constraint("batch_jurisdiction_id_name_key", "batch", type_="unique")
    op.drop_column("batch", "storage_location")


def downgrade():  # pragma: no cover
    pass
    # # ### commands auto generated by Alembic - please adjust! ###
    # op.add_column('batch', sa.Column('storage_location', sa.VARCHAR(length=200), autoincrement=False, nullable=True))
    # op.create_unique_constraint('batch_jurisdiction_id_name_key', 'batch', ['jurisdiction_id', 'name'])
    # op.drop_constraint(op.f('batch_jurisdiction_id_tabulator_name_key'), 'batch', type_='unique')
    # op.drop_column('batch', 'container')
    # # ### end Alembic commands ###
