"""add registration_date to DUNS

Revision ID: e4ac552148ef
Revises: 9589687eea88
Create Date: 2017-09-14 11:16:12.888127

"""

# revision identifiers, used by Alembic.
revision = 'e4ac552148ef'
down_revision = '9589687eea88'
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.add_column('duns', sa.Column('registration_date', sa.Date(), nullable=True))
    op.create_index(op.f('ix_duns_registration_date'), 'duns', ['registration_date'], unique=False)
    ### end Alembic commands ###


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

