"""updating ASP models

Revision ID: a3dd8fcc17bf
Revises: 4a1988f74a78
Create Date: 2017-01-25 13:01:29.096537

"""

# revision identifiers, used by Alembic.
revision = 'a3dd8fcc17bf'
down_revision = '4a1988f74a78'
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.drop_column('detached_award_financial_assistance', 'awarding_office_name')
    op.drop_column('detached_award_financial_assistance', 'total_funding_amount')
    op.drop_column('detached_award_financial_assistance', 'place_of_performance_city')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_county_name')
    op.drop_column('detached_award_financial_assistance', 'funding_office_name')
    op.drop_column('detached_award_financial_assistance', 'awarding_sub_tier_agency_n')
    op.drop_column('detached_award_financial_assistance', 'place_of_perform_state_nam')
    op.drop_column('detached_award_financial_assistance', 'funding_sub_tier_agency_na')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_city_code')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_state_code')
    op.drop_column('detached_award_financial_assistance', 'funding_agency_name')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_congressional')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_city_name')
    op.drop_column('detached_award_financial_assistance', 'cfda_title')
    op.drop_column('detached_award_financial_assistance', 'place_of_perform_county_na')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_county_code')
    op.drop_column('detached_award_financial_assistance', 'awarding_agency_name')
    op.drop_column('detached_award_financial_assistance', 'legal_entity_state_name')
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_state_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('awarding_agency_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_county_code', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('place_of_perform_county_na', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('cfda_title', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_city_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_congressional', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('funding_agency_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_state_code', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_city_code', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('funding_sub_tier_agency_na', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('place_of_perform_state_nam', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('awarding_sub_tier_agency_n', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('funding_office_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('legal_entity_county_name', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('place_of_performance_city', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('total_funding_amount', sa.NUMERIC(), autoincrement=False, nullable=True))
    op.add_column('detached_award_financial_assistance', sa.Column('awarding_office_name', sa.TEXT(), autoincrement=False, nullable=True))
    ### end Alembic commands ###

