""" Dropping HistoricParentDuns table

Revision ID: 653d47c65df8
Revises: 0a36baf32413
Create Date: 2019-07-24 18:33:32.098658

"""

# revision identifiers, used by Alembic.
revision = '653d47c65df8'
down_revision = '0a36baf32413'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

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.drop_table('historic_parent_duns')
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('historic_parent_duns',
    sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('duns_id', sa.INTEGER(), nullable=False),
    sa.Column('year', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('awardee_or_recipient_uniqu', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('legal_business_name', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('activation_date', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('deactivation_date', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('registration_date', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('expiration_date', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('last_sam_mod_date', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('ultimate_parent_unique_ide', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('ultimate_parent_legal_enti', sa.TEXT(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('duns_id', name='historic_parent_duns_pkey')
    )
    # ### end Alembic commands ###

