"""add indexing to DUNS table

Revision ID: d35ecdfc1da7
Revises: 4b1ee78268fb
Create Date: 2017-08-31 12:03:16.395760

"""

# revision identifiers, used by Alembic.
revision = 'd35ecdfc1da7'
down_revision = '4b1ee78268fb'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_duns_activation_date'), 'duns', ['activation_date'], unique=False)
    op.create_index(op.f('ix_duns_deactivation_date'), 'duns', ['deactivation_date'], unique=False)
    op.create_index(op.f('ix_duns_expiration_date'), 'duns', ['expiration_date'], unique=False)
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_duns_expiration_date'), table_name='duns')
    op.drop_index(op.f('ix_duns_deactivation_date'), table_name='duns')
    op.drop_index(op.f('ix_duns_activation_date'), table_name='duns')
    ### end Alembic commands ###

