"""Added simple FK indexes

Revision ID: 142224936b78
Revises: 36c23e6c0183
Create Date: 2016-05-31 11:04:18.150288

"""

# revision identifiers, used by Alembic.
revision = '142224936b78'
down_revision = '36c23e6c0183'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_VendorElnPartDetail_vpno_id'), 'VendorElnPartDetail', ['vpno_id'], unique=True)
    op.drop_constraint(u'VendorElnPartDetail_vpno_id_key', 'VendorElnPartDetail', type_='unique')
    op.create_index(op.f('ix_VendorPartDetail_vpno_id'), 'VendorPartDetail', ['vpno_id'], unique=True)
    op.drop_constraint(u'VendorPartDetail_vpno_id_key', 'VendorPartDetail', type_='unique')
    op.create_index(op.f('ix_VendorPartNumber_vpmap_id'), 'VendorPartNumber', ['vpmap_id'], unique=False)
    op.create_index(op.f('ix_VendorPrice_vpno_id'), 'VendorPrice', ['vpno_id'], unique=False)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_VendorPrice_vpno_id'), table_name='VendorPrice')
    op.drop_index(op.f('ix_VendorPartNumber_vpmap_id'), table_name='VendorPartNumber')
    op.create_unique_constraint(u'VendorPartDetail_vpno_id_key', 'VendorPartDetail', ['vpno_id'])
    op.drop_index(op.f('ix_VendorPartDetail_vpno_id'), table_name='VendorPartDetail')
    op.create_unique_constraint(u'VendorElnPartDetail_vpno_id_key', 'VendorElnPartDetail', ['vpno_id'])
    op.drop_index(op.f('ix_VendorElnPartDetail_vpno_id'), table_name='VendorElnPartDetail')
    ### end Alembic commands ###
