"""remove il_from_namespace

Revision ID: dc5c0f8d5e77
Revises: 52ed4b839ab6
Create Date: 2018-08-18 17:44:31.743929

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'dc5c0f8d5e77'
down_revision = '52ed4b839ab6'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('imagelinks_il_from_namespace_fkey', 'imagelinks', type_='foreignkey')
    op.drop_column('imagelinks', 'il_from_namespace')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('imagelinks', sa.Column('il_from_namespace', sa.INTEGER(), autoincrement=False, nullable=False))
    op.create_foreign_key('imagelinks_il_from_namespace_fkey', 'imagelinks', 'namespace', ['il_from_namespace'], ['ns_id'])
    # ### end Alembic commands ###
