"""d-model-to-text

Revision ID: 1e0b1d3e3cca
Revises: 1ae491ca0925
Create Date: 2016-09-08 09:34:56.153584

"""

# revision identifiers, used by Alembic.
revision = '1e0b1d3e3cca'
down_revision = '1ae491ca0925'
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.alter_column('award_financial_assistance', 'face_value_loan_guarantee',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'federal_action_obligation',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'non_federal_funding_amount',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'original_loan_subsidy_cost',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'record_type',
               existing_type=sa.INTEGER(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'total_funding_amount',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_procurement', 'current_total_value_award',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    op.alter_column('award_procurement', 'potential_total_value_awar',
               existing_type=sa.NUMERIC(),
               type_=sa.Text(),
               existing_nullable=True)
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('award_procurement', 'potential_total_value_awar',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_procurement', 'current_total_value_award',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'total_funding_amount',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'record_type',
               existing_type=sa.Text(),
               type_=sa.INTEGER(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'original_loan_subsidy_cost',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'non_federal_funding_amount',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'federal_action_obligation',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    op.alter_column('award_financial_assistance', 'face_value_loan_guarantee',
               existing_type=sa.Text(),
               type_=sa.NUMERIC(),
               existing_nullable=True)
    ### end Alembic commands ###

