"""Enable nullable limit_latest_versions

Revision ID: 1ee67d9a7861
Revises: 9168881dd125
Create Date: 2019-09-24 11:00:29.326556+00:00

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1ee67d9a7861'
down_revision = '9168881dd125'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('adviser_run', 'limit_latest_versions',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.create_unique_constraint(None, 'python_package_version_entity', ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'python_package_version_entity', type_='unique')
    op.alter_column('adviser_run', 'limit_latest_versions',
               existing_type=sa.INTEGER(),
               nullable=False)
    # ### end Alembic commands ###
