"""Create certified D1 and D2 tables

Revision ID: 81969f6e3733
Revises: ce018801e0fa
Create Date: 2020-02-20 10:47:16.084635

"""

# revision identifiers, used by Alembic.
revision = '81969f6e3733'
down_revision = 'ce018801e0fa'
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.create_table('certified_award_financial_assistance',
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('certified_award_financial_assistance_id', sa.Integer(), nullable=False),
    sa.Column('afa_generated_unique', sa.Text(), nullable=True),
    sa.Column('submission_id', sa.Integer(), nullable=False),
    sa.Column('job_id', sa.Integer(), nullable=True),
    sa.Column('row_number', sa.Integer(), nullable=True),
    sa.Column('action_date', sa.Text(), nullable=True),
    sa.Column('action_type', sa.Text(), nullable=True),
    sa.Column('action_type_description', sa.Text(), nullable=True),
    sa.Column('assistance_type', sa.Text(), nullable=True),
    sa.Column('assistance_type_desc', sa.Text(), nullable=True),
    sa.Column('award_description', sa.Text(), nullable=True),
    sa.Column('awardee_or_recipient_legal', sa.Text(), nullable=True),
    sa.Column('awardee_or_recipient_uniqu', sa.Text(), nullable=True),
    sa.Column('awarding_agency_code', sa.Text(), nullable=True),
    sa.Column('awarding_agency_name', sa.Text(), nullable=True),
    sa.Column('awarding_office_code', sa.Text(), nullable=True),
    sa.Column('awarding_office_name', sa.Text(), nullable=True),
    sa.Column('awarding_sub_tier_agency_c', sa.Text(), nullable=True),
    sa.Column('awarding_sub_tier_agency_n', sa.Text(), nullable=True),
    sa.Column('award_modification_amendme', sa.Text(), nullable=True),
    sa.Column('business_funds_indicator', sa.Text(), nullable=True),
    sa.Column('business_funds_ind_desc', sa.Text(), nullable=True),
    sa.Column('business_types', sa.Text(), nullable=True),
    sa.Column('business_types_desc', sa.Text(), nullable=True),
    sa.Column('cfda_number', sa.Text(), nullable=True),
    sa.Column('cfda_title', sa.Text(), nullable=True),
    sa.Column('correction_delete_indicatr', sa.Text(), nullable=True),
    sa.Column('correction_delete_ind_desc', sa.Text(), nullable=True),
    sa.Column('face_value_loan_guarantee', sa.Text(), nullable=True),
    sa.Column('fain', sa.Text(), nullable=True),
    sa.Column('federal_action_obligation', sa.Numeric(), nullable=True),
    sa.Column('fiscal_year_and_quarter_co', sa.Text(), nullable=True),
    sa.Column('funding_agency_code', sa.Text(), nullable=True),
    sa.Column('funding_agency_name', sa.Text(), nullable=True),
    sa.Column('funding_office_name', sa.Text(), nullable=True),
    sa.Column('funding_office_code', sa.Text(), nullable=True),
    sa.Column('funding_sub_tier_agency_co', sa.Text(), nullable=True),
    sa.Column('funding_sub_tier_agency_na', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line1', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line2', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line3', sa.Text(), nullable=True),
    sa.Column('legal_entity_city_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_city_name', sa.Text(), nullable=True),
    sa.Column('legal_entity_congressional', sa.Text(), nullable=True),
    sa.Column('legal_entity_country_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_county_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_county_name', sa.Text(), nullable=True),
    sa.Column('legal_entity_foreign_city', sa.Text(), nullable=True),
    sa.Column('legal_entity_foreign_posta', sa.Text(), nullable=True),
    sa.Column('legal_entity_foreign_provi', sa.Text(), nullable=True),
    sa.Column('legal_entity_state_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_state_name', sa.Text(), nullable=True),
    sa.Column('legal_entity_zip5', sa.Text(), nullable=True),
    sa.Column('legal_entity_zip_last4', sa.Text(), nullable=True),
    sa.Column('non_federal_funding_amount', sa.Text(), nullable=True),
    sa.Column('original_loan_subsidy_cost', sa.Text(), nullable=True),
    sa.Column('period_of_performance_curr', sa.Text(), nullable=True),
    sa.Column('period_of_performance_star', sa.Text(), nullable=True),
    sa.Column('place_of_performance_city', sa.Text(), nullable=True),
    sa.Column('place_of_performance_code', sa.Text(), nullable=True),
    sa.Column('place_of_performance_congr', sa.Text(), nullable=True),
    sa.Column('place_of_perform_country_c', sa.Text(), nullable=True),
    sa.Column('place_of_perform_county_na', sa.Text(), nullable=True),
    sa.Column('place_of_performance_forei', sa.Text(), nullable=True),
    sa.Column('place_of_perform_state_nam', sa.Text(), nullable=True),
    sa.Column('place_of_performance_zip4a', sa.Text(), nullable=True),
    sa.Column('record_type', sa.Text(), nullable=True),
    sa.Column('record_type_description', sa.Text(), nullable=True),
    sa.Column('sai_number', sa.Text(), nullable=True),
    sa.Column('total_funding_amount', sa.Text(), nullable=True),
    sa.Column('ultimate_parent_legal_enti', sa.Text(), nullable=True),
    sa.Column('ultimate_parent_unique_ide', sa.Text(), nullable=True),
    sa.Column('uri', sa.Text(), nullable=True),
    sa.Column('place_of_perform_county_co', sa.Text(), nullable=True),
    sa.Column('place_of_perform_country_n', sa.Text(), nullable=True),
    sa.Column('legal_entity_country_name', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['submission_id'], ['submission.submission_id'], name='fk_award_financial_assistance_submission_id', ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('certified_award_financial_assistance_id')
    )
    op.create_index(op.f('ix_certified_award_financial_assistance_submission_id'), 'certified_award_financial_assistance', ['submission_id'], unique=False)
    op.create_table('certified_award_procurement',
    *[sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('certified_award_procurement_id', sa.Integer(), nullable=False),
    sa.Column('detached_award_proc_unique', sa.Text(), nullable=True),
    sa.Column('submission_id', sa.Integer(), nullable=False),
    sa.Column('job_id', sa.Integer(), nullable=True),
    sa.Column('row_number', sa.Integer(), nullable=True),
    sa.Column('piid', sa.Text(), nullable=True),
    sa.Column('awarding_sub_tier_agency_c', sa.Text(), nullable=True),
    sa.Column('awarding_sub_tier_agency_n', sa.Text(), nullable=True),
    sa.Column('awarding_agency_code', sa.Text(), nullable=True),
    sa.Column('awarding_agency_name', sa.Text(), nullable=True),
    sa.Column('parent_award_id', sa.Text(), nullable=True),
    sa.Column('award_modification_amendme', sa.Text(), nullable=True),
    sa.Column('type_of_contract_pricing', sa.Text(), nullable=True),
    sa.Column('type_of_contract_pric_desc', sa.Text(), nullable=True),
    sa.Column('contract_award_type', sa.Text(), nullable=True),
    sa.Column('contract_award_type_desc', sa.Text(), nullable=True),
    sa.Column('naics', sa.Text(), nullable=True),
    sa.Column('naics_description', sa.Text(), nullable=True),
    sa.Column('awardee_or_recipient_uniqu', sa.Text(), nullable=True),
    sa.Column('ultimate_parent_legal_enti', sa.Text(), nullable=True),
    sa.Column('ultimate_parent_unique_ide', sa.Text(), nullable=True),
    sa.Column('award_description', sa.Text(), nullable=True),
    sa.Column('place_of_performance_zip4a', sa.Text(), nullable=True),
    sa.Column('place_of_performance_city', sa.Text(), nullable=True),
    sa.Column('place_of_performance_congr', sa.Text(), nullable=True),
    sa.Column('awardee_or_recipient_legal', sa.Text(), nullable=True),
    sa.Column('legal_entity_city_name', sa.Text(), nullable=True),
    sa.Column('legal_entity_state_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_state_descrip', sa.Text(), nullable=True),
    sa.Column('legal_entity_zip4', sa.Text(), nullable=True),
    sa.Column('legal_entity_congressional', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line1', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line2', sa.Text(), nullable=True),
    sa.Column('legal_entity_address_line3', sa.Text(), nullable=True),
    sa.Column('legal_entity_country_code', sa.Text(), nullable=True),
    sa.Column('legal_entity_country_name', sa.Text(), nullable=True),
    sa.Column('period_of_performance_star', sa.Text(), nullable=True),
    sa.Column('period_of_performance_curr', sa.Text(), nullable=True),
    sa.Column('period_of_perf_potential_e', sa.Text(), nullable=True),
    sa.Column('ordering_period_end_date', sa.Text(), nullable=True),
    sa.Column('action_date', sa.Text(), nullable=True),
    sa.Column('action_type', sa.Text(), nullable=True),
    sa.Column('action_type_description', sa.Text(), nullable=True),
    sa.Column('federal_action_obligation', sa.Numeric(), nullable=True),
    sa.Column('current_total_value_award', sa.Text(), nullable=True),
    sa.Column('potential_total_value_awar', sa.Text(), nullable=True),
    sa.Column('funding_sub_tier_agency_co', sa.Text(), nullable=True),
    sa.Column('funding_sub_tier_agency_na', sa.Text(), nullable=True),
    sa.Column('funding_office_code', sa.Text(), nullable=True),
    sa.Column('funding_office_name', sa.Text(), nullable=True),
    sa.Column('awarding_office_code', sa.Text(), nullable=True),
    sa.Column('awarding_office_name', sa.Text(), nullable=True),
    sa.Column('referenced_idv_agency_iden', sa.Text(), nullable=True),
    sa.Column('funding_agency_code', sa.Text(), nullable=True),
    sa.Column('funding_agency_name', sa.Text(), nullable=True),
    sa.Column('place_of_performance_locat', sa.Text(), nullable=True),
    sa.Column('place_of_performance_state', sa.Text(), nullable=True),
    sa.Column('place_of_perform_country_c', sa.Text(), nullable=True),
    sa.Column('idv_type', sa.Text(), nullable=True),
    sa.Column('idv_type_description', sa.Text(), nullable=True),
    sa.Column('vendor_doing_as_business_n', sa.Text(), nullable=True),
    sa.Column('vendor_phone_number', sa.Text(), nullable=True),
    sa.Column('vendor_fax_number', sa.Text(), nullable=True),
    sa.Column('multiple_or_single_award_i', sa.Text(), nullable=True),
    sa.Column('multiple_or_single_aw_desc', sa.Text(), nullable=True),
    sa.Column('referenced_mult_or_single', sa.Text(), nullable=True),
    sa.Column('referenced_mult_or_si_desc', sa.Text(), nullable=True),
    sa.Column('type_of_idc', sa.Text(), nullable=True),
    sa.Column('type_of_idc_description', sa.Text(), nullable=True),
    sa.Column('a_76_fair_act_action', sa.Text(), nullable=True),
    sa.Column('a_76_fair_act_action_desc', sa.Text(), nullable=True),
    sa.Column('dod_claimant_program_code', sa.Text(), nullable=True),
    sa.Column('dod_claimant_prog_cod_desc', sa.Text(), nullable=True),
    sa.Column('clinger_cohen_act_planning', sa.Text(), nullable=True),
    sa.Column('clinger_cohen_act_pla_desc', sa.Text(), nullable=True),
    sa.Column('commercial_item_acquisitio', sa.Text(), nullable=True),
    sa.Column('commercial_item_acqui_desc', sa.Text(), nullable=True),
    sa.Column('commercial_item_test_progr', sa.Text(), nullable=True),
    sa.Column('commercial_item_test_desc', sa.Text(), nullable=True),
    sa.Column('consolidated_contract', sa.Text(), nullable=True),
    sa.Column('consolidated_contract_desc', sa.Text(), nullable=True),
    sa.Column('contingency_humanitarian_o', sa.Text(), nullable=True),
    sa.Column('contingency_humanitar_desc', sa.Text(), nullable=True),
    sa.Column('contract_bundling', sa.Text(), nullable=True),
    sa.Column('contract_bundling_descrip', sa.Text(), nullable=True),
    sa.Column('contract_financing', sa.Text(), nullable=True),
    sa.Column('contract_financing_descrip', sa.Text(), nullable=True),
    sa.Column('contracting_officers_deter', sa.Text(), nullable=True),
    sa.Column('contracting_officers_desc', sa.Text(), nullable=True),
    sa.Column('cost_accounting_standards', sa.Text(), nullable=True),
    sa.Column('cost_accounting_stand_desc', sa.Text(), nullable=True),
    sa.Column('cost_or_pricing_data', sa.Text(), nullable=True),
    sa.Column('cost_or_pricing_data_desc', sa.Text(), nullable=True),
    sa.Column('country_of_product_or_serv', sa.Text(), nullable=True),
    sa.Column('country_of_product_or_desc', sa.Text(), nullable=True),
    sa.Column('construction_wage_rate_req', sa.Text(), nullable=True),
    sa.Column('construction_wage_rat_desc', sa.Text(), nullable=True),
    sa.Column('evaluated_preference', sa.Text(), nullable=True),
    sa.Column('evaluated_preference_desc', sa.Text(), nullable=True),
    sa.Column('extent_competed', sa.Text(), nullable=True),
    sa.Column('extent_compete_description', sa.Text(), nullable=True),
    sa.Column('fed_biz_opps', sa.Text(), nullable=True),
    sa.Column('fed_biz_opps_description', sa.Text(), nullable=True),
    sa.Column('foreign_funding', sa.Text(), nullable=True),
    sa.Column('foreign_funding_desc', sa.Text(), nullable=True),
    sa.Column('government_furnished_prope', sa.Text(), nullable=True),
    sa.Column('government_furnished_desc', sa.Text(), nullable=True),
    sa.Column('information_technology_com', sa.Text(), nullable=True),
    sa.Column('information_technolog_desc', sa.Text(), nullable=True),
    sa.Column('interagency_contracting_au', sa.Text(), nullable=True),
    sa.Column('interagency_contract_desc', sa.Text(), nullable=True),
    sa.Column('local_area_set_aside', sa.Text(), nullable=True),
    sa.Column('local_area_set_aside_desc', sa.Text(), nullable=True),
    sa.Column('major_program', sa.Text(), nullable=True),
    sa.Column('purchase_card_as_payment_m', sa.Text(), nullable=True),
    sa.Column('purchase_card_as_paym_desc', sa.Text(), nullable=True),
    sa.Column('multi_year_contract', sa.Text(), nullable=True),
    sa.Column('multi_year_contract_desc', sa.Text(), nullable=True),
    sa.Column('national_interest_action', sa.Text(), nullable=True),
    sa.Column('national_interest_desc', sa.Text(), nullable=True),
    sa.Column('number_of_actions', sa.Text(), nullable=True),
    sa.Column('number_of_offers_received', sa.Text(), nullable=True),
    sa.Column('other_statutory_authority', sa.Text(), nullable=True),
    sa.Column('performance_based_service', sa.Text(), nullable=True),
    sa.Column('performance_based_se_desc', sa.Text(), nullable=True),
    sa.Column('place_of_manufacture', sa.Text(), nullable=True),
    sa.Column('place_of_manufacture_desc', sa.Text(), nullable=True),
    sa.Column('price_evaluation_adjustmen', sa.Text(), nullable=True),
    sa.Column('product_or_service_code', sa.Text(), nullable=True),
    sa.Column('product_or_service_co_desc', sa.Text(), nullable=True),
    sa.Column('program_acronym', sa.Text(), nullable=True),
    sa.Column('other_than_full_and_open_c', sa.Text(), nullable=True),
    sa.Column('other_than_full_and_o_desc', sa.Text(), nullable=True),
    sa.Column('recovered_materials_sustai', sa.Text(), nullable=True),
    sa.Column('recovered_materials_s_desc', sa.Text(), nullable=True),
    sa.Column('research', sa.Text(), nullable=True),
    sa.Column('research_description', sa.Text(), nullable=True),
    sa.Column('sea_transportation', sa.Text(), nullable=True),
    sa.Column('sea_transportation_desc', sa.Text(), nullable=True),
    sa.Column('labor_standards', sa.Text(), nullable=True),
    sa.Column('labor_standards_descrip', sa.Text(), nullable=True),
    sa.Column('small_business_competitive', sa.Text(), nullable=True),
    sa.Column('solicitation_identifier', sa.Text(), nullable=True),
    sa.Column('solicitation_date', sa.Text(), nullable=True),
    sa.Column('solicitation_procedures', sa.Text(), nullable=True),
    sa.Column('solicitation_procedur_desc', sa.Text(), nullable=True),
    sa.Column('fair_opportunity_limited_s', sa.Text(), nullable=True),
    sa.Column('fair_opportunity_limi_desc', sa.Text(), nullable=True),
    sa.Column('subcontracting_plan', sa.Text(), nullable=True),
    sa.Column('subcontracting_plan_desc', sa.Text(), nullable=True),
    sa.Column('program_system_or_equipmen', sa.Text(), nullable=True),
    sa.Column('program_system_or_equ_desc', sa.Text(), nullable=True),
    sa.Column('type_set_aside', sa.Text(), nullable=True),
    sa.Column('type_set_aside_description', sa.Text(), nullable=True),
    sa.Column('epa_designated_product', sa.Text(), nullable=True),
    sa.Column('epa_designated_produc_desc', sa.Text(), nullable=True),
    sa.Column('materials_supplies_article', sa.Text(), nullable=True),
    sa.Column('materials_supplies_descrip', sa.Text(), nullable=True),
    sa.Column('transaction_number', sa.Text(), nullable=True),
    sa.Column('sam_exception', sa.Text(), nullable=True),
    sa.Column('sam_exception_description', sa.Text(), nullable=True),
    sa.Column('city_local_government', sa.Text(), nullable=True),
    sa.Column('county_local_government', sa.Text(), nullable=True),
    sa.Column('inter_municipal_local_gove', sa.Text(), nullable=True),
    sa.Column('local_government_owned', sa.Text(), nullable=True),
    sa.Column('municipality_local_governm', sa.Text(), nullable=True),
    sa.Column('school_district_local_gove', sa.Text(), nullable=True),
    sa.Column('township_local_government', sa.Text(), nullable=True),
    sa.Column('us_state_government', sa.Text(), nullable=True),
    sa.Column('us_federal_government', sa.Text(), nullable=True),
    sa.Column('federal_agency', sa.Text(), nullable=True),
    sa.Column('federally_funded_research', sa.Text(), nullable=True),
    sa.Column('us_tribal_government', sa.Text(), nullable=True),
    sa.Column('foreign_government', sa.Text(), nullable=True),
    sa.Column('community_developed_corpor', sa.Text(), nullable=True),
    sa.Column('labor_surplus_area_firm', sa.Text(), nullable=True),
    sa.Column('corporate_entity_not_tax_e', sa.Text(), nullable=True),
    sa.Column('corporate_entity_tax_exemp', sa.Text(), nullable=True),
    sa.Column('partnership_or_limited_lia', sa.Text(), nullable=True),
    sa.Column('sole_proprietorship', sa.Text(), nullable=True),
    sa.Column('small_agricultural_coopera', sa.Text(), nullable=True),
    sa.Column('international_organization', sa.Text(), nullable=True),
    sa.Column('us_government_entity', sa.Text(), nullable=True),
    sa.Column('emerging_small_business', sa.Text(), nullable=True),
    sa.Column('c8a_program_participant', sa.Text(), nullable=True),
    sa.Column('sba_certified_8_a_joint_ve', sa.Text(), nullable=True),
    sa.Column('dot_certified_disadvantage', sa.Text(), nullable=True),
    sa.Column('self_certified_small_disad', sa.Text(), nullable=True),
    sa.Column('historically_underutilized', sa.Text(), nullable=True),
    sa.Column('small_disadvantaged_busine', sa.Text(), nullable=True),
    sa.Column('the_ability_one_program', sa.Text(), nullable=True),
    sa.Column('historically_black_college', sa.Text(), nullable=True),
    sa.Column('c1862_land_grant_college', sa.Text(), nullable=True),
    sa.Column('c1890_land_grant_college', sa.Text(), nullable=True),
    sa.Column('c1994_land_grant_college', sa.Text(), nullable=True),
    sa.Column('minority_institution', sa.Text(), nullable=True),
    sa.Column('private_university_or_coll', sa.Text(), nullable=True),
    sa.Column('school_of_forestry', sa.Text(), nullable=True),
    sa.Column('state_controlled_instituti', sa.Text(), nullable=True),
    sa.Column('tribal_college', sa.Text(), nullable=True),
    sa.Column('veterinary_college', sa.Text(), nullable=True),
    sa.Column('educational_institution', sa.Text(), nullable=True),
    sa.Column('alaskan_native_servicing_i', sa.Text(), nullable=True),
    sa.Column('community_development_corp', sa.Text(), nullable=True),
    sa.Column('native_hawaiian_servicing', sa.Text(), nullable=True),
    sa.Column('domestic_shelter', sa.Text(), nullable=True),
    sa.Column('manufacturer_of_goods', sa.Text(), nullable=True),
    sa.Column('hospital_flag', sa.Text(), nullable=True),
    sa.Column('veterinary_hospital', sa.Text(), nullable=True),
    sa.Column('hispanic_servicing_institu', sa.Text(), nullable=True),
    sa.Column('foundation', sa.Text(), nullable=True),
    sa.Column('woman_owned_business', sa.Text(), nullable=True),
    sa.Column('minority_owned_business', sa.Text(), nullable=True),
    sa.Column('women_owned_small_business', sa.Text(), nullable=True),
    sa.Column('economically_disadvantaged', sa.Text(), nullable=True),
    sa.Column('joint_venture_women_owned', sa.Text(), nullable=True),
    sa.Column('joint_venture_economically', sa.Text(), nullable=True),
    sa.Column('veteran_owned_business', sa.Text(), nullable=True),
    sa.Column('service_disabled_veteran_o', sa.Text(), nullable=True),
    sa.Column('contracts', sa.Text(), nullable=True),
    sa.Column('grants', sa.Text(), nullable=True),
    sa.Column('receives_contracts_and_gra', sa.Text(), nullable=True),
    sa.Column('airport_authority', sa.Text(), nullable=True),
    sa.Column('council_of_governments', sa.Text(), nullable=True),
    sa.Column('housing_authorities_public', sa.Text(), nullable=True),
    sa.Column('interstate_entity', sa.Text(), nullable=True),
    sa.Column('planning_commission', sa.Text(), nullable=True),
    sa.Column('port_authority', sa.Text(), nullable=True),
    sa.Column('transit_authority', sa.Text(), nullable=True),
    sa.Column('subchapter_s_corporation', sa.Text(), nullable=True),
    sa.Column('limited_liability_corporat', sa.Text(), nullable=True),
    sa.Column('foreign_owned_and_located', sa.Text(), nullable=True),
    sa.Column('american_indian_owned_busi', sa.Text(), nullable=True),
    sa.Column('alaskan_native_owned_corpo', sa.Text(), nullable=True),
    sa.Column('indian_tribe_federally_rec', sa.Text(), nullable=True),
    sa.Column('native_hawaiian_owned_busi', sa.Text(), nullable=True),
    sa.Column('tribally_owned_business', sa.Text(), nullable=True),
    sa.Column('asian_pacific_american_own', sa.Text(), nullable=True),
    sa.Column('black_american_owned_busin', sa.Text(), nullable=True),
    sa.Column('hispanic_american_owned_bu', sa.Text(), nullable=True),
    sa.Column('native_american_owned_busi', sa.Text(), nullable=True),
    sa.Column('subcontinent_asian_asian_i', sa.Text(), nullable=True),
    sa.Column('other_minority_owned_busin', sa.Text(), nullable=True),
    sa.Column('for_profit_organization', sa.Text(), nullable=True),
    sa.Column('nonprofit_organization', sa.Text(), nullable=True),
    sa.Column('other_not_for_profit_organ', sa.Text(), nullable=True),
    sa.Column('us_local_government', sa.Text(), nullable=True),
    sa.Column('referenced_idv_modificatio', sa.Text(), nullable=True),
    sa.Column('undefinitized_action', sa.Text(), nullable=True),
    sa.Column('undefinitized_action_desc', sa.Text(), nullable=True),
    sa.Column('domestic_or_foreign_entity', sa.Text(), nullable=True),
    sa.Column('domestic_or_foreign_e_desc', sa.Text(), nullable=True),
    sa.Column('referenced_idv_type', sa.Text(), nullable=True),
    sa.Column('referenced_idv_type_desc', sa.Text(), nullable=True),
    sa.Column('referenced_idv_agency_name', sa.Text(), nullable=True),
    sa.Column('award_or_idv_flag', sa.Text(), nullable=True),
    sa.Column('place_of_perform_country_n', sa.Text(), nullable=True),
    sa.Column('place_of_perform_state_nam', sa.Text(), nullable=True),
    sa.Column('place_of_perform_county_na', sa.Text(), nullable=True),
    sa.Column('base_exercised_options_val', sa.Text(), nullable=True),
    sa.Column('base_and_all_options_value', sa.Text(), nullable=True),
    sa.Column('cage_code', sa.Text(), nullable=True),
    sa.Column('inherently_government_func', sa.Text(), nullable=True),
    sa.Column('inherently_government_desc', sa.Text(), nullable=True),
    sa.Column('organizational_type', sa.Text(), nullable=True),
    sa.Column('number_of_employees', sa.Text(), nullable=True),
    sa.Column('annual_revenue', sa.Text(), nullable=True),
    sa.Column('total_obligated_amount', sa.Text(), nullable=True),
    sa.Column('last_modified', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['submission_id'], ['submission.submission_id'], name='fk_award_procurement_submission_id', ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('certified_award_procurement_id')]
    )
    op.create_index(op.f('ix_certified_award_procurement_submission_id'), 'certified_award_procurement', ['submission_id'], unique=False)
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_certified_award_procurement_submission_id'), table_name='certified_award_procurement')
    op.drop_table('certified_award_procurement')
    op.drop_index(op.f('ix_certified_award_financial_assistance_submission_id'), table_name='certified_award_financial_assistance')
    op.drop_table('certified_award_financial_assistance')
    # ### end Alembic commands ###

