"""Add legal entity city, county, and state info to PublishedAwardFinancialAssistance

Revision ID: 0ca75433c435
Revises: 18d9b114c1dc
Create Date: 2017-07-31 10:56:52.937763

"""

# revision identifiers, used by Alembic.
revision = '0ca75433c435'
down_revision = '18d9b114c1dc'
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('published_award_financial_assistance', sa.Column('legal_entity_city_name', sa.Text(), nullable=True))
    op.add_column('published_award_financial_assistance', sa.Column('legal_entity_county_code', sa.Text(), nullable=True))
    op.add_column('published_award_financial_assistance', sa.Column('legal_entity_county_name', sa.Text(), nullable=True))
    op.add_column('published_award_financial_assistance', sa.Column('legal_entity_state_code', sa.Text(), nullable=True))
    op.add_column('published_award_financial_assistance', sa.Column('legal_entity_state_name', sa.Text(), nullable=True))
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('published_award_financial_assistance', 'legal_entity_county_name')
    op.drop_column('published_award_financial_assistance', 'legal_entity_county_code')
    op.drop_column('published_award_financial_assistance', 'legal_entity_city_name')
    op.drop_column('published_award_financial_assistance', 'legal_entity_state_code')
    op.drop_column('published_award_financial_assistance', 'legal_entity_state_name')
    ### end Alembic commands ###

