"""updating relevant detached_award_procurement columns to booleans

Revision ID: e78ee7ac53d0
Revises: 11338a6b7e77
Create Date: 2022-01-04 11:51:26.195449

"""

# revision identifiers, used by Alembic.
revision = 'e78ee7ac53d0'
down_revision = '11338a6b7e77'
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! ###
    # Award Procurement
    # Add temp columns
    op.execute("""
        ALTER TABLE award_procurement ADD small_business_competitive_temp boolean;
        ALTER TABLE award_procurement ADD city_local_government_temp boolean;
        ALTER TABLE award_procurement ADD county_local_government_temp boolean;
        ALTER TABLE award_procurement ADD inter_municipal_local_gove_temp boolean;
        ALTER TABLE award_procurement ADD local_government_owned_temp boolean;
        ALTER TABLE award_procurement ADD municipality_local_governm_temp boolean;
        ALTER TABLE award_procurement ADD school_district_local_gove_temp boolean;
        ALTER TABLE award_procurement ADD township_local_government_temp boolean;
        ALTER TABLE award_procurement ADD us_state_government_temp boolean;
        ALTER TABLE award_procurement ADD us_federal_government_temp boolean;
        ALTER TABLE award_procurement ADD federal_agency_temp boolean;
        ALTER TABLE award_procurement ADD federally_funded_research_temp boolean;
        ALTER TABLE award_procurement ADD us_tribal_government_temp boolean;
        ALTER TABLE award_procurement ADD foreign_government_temp boolean;
        ALTER TABLE award_procurement ADD community_developed_corpor_temp boolean;
        ALTER TABLE award_procurement ADD labor_surplus_area_firm_temp boolean;
        ALTER TABLE award_procurement ADD corporate_entity_not_tax_e_temp boolean;
        ALTER TABLE award_procurement ADD corporate_entity_tax_exemp_temp boolean;
        ALTER TABLE award_procurement ADD partnership_or_limited_lia_temp boolean;
        ALTER TABLE award_procurement ADD sole_proprietorship_temp boolean;
        ALTER TABLE award_procurement ADD small_agricultural_coopera_temp boolean;
        ALTER TABLE award_procurement ADD international_organization_temp boolean;
        ALTER TABLE award_procurement ADD us_government_entity_temp boolean;
        ALTER TABLE award_procurement ADD emerging_small_business_temp boolean;
        ALTER TABLE award_procurement ADD c8a_program_participant_temp boolean;
        ALTER TABLE award_procurement ADD sba_certified_8_a_joint_ve_temp boolean;
        ALTER TABLE award_procurement ADD dot_certified_disadvantage_temp boolean;
        ALTER TABLE award_procurement ADD self_certified_small_disad_temp boolean;
        ALTER TABLE award_procurement ADD historically_underutilized_temp boolean;
        ALTER TABLE award_procurement ADD small_disadvantaged_busine_temp boolean;
        ALTER TABLE award_procurement ADD the_ability_one_program_temp boolean;
        ALTER TABLE award_procurement ADD historically_black_college_temp boolean;
        ALTER TABLE award_procurement ADD c1862_land_grant_college_temp boolean;
        ALTER TABLE award_procurement ADD c1890_land_grant_college_temp boolean;
        ALTER TABLE award_procurement ADD c1994_land_grant_college_temp boolean;
        ALTER TABLE award_procurement ADD minority_institution_temp boolean;
        ALTER TABLE award_procurement ADD private_university_or_coll_temp boolean;
        ALTER TABLE award_procurement ADD school_of_forestry_temp boolean;
        ALTER TABLE award_procurement ADD state_controlled_instituti_temp boolean;
        ALTER TABLE award_procurement ADD tribal_college_temp boolean;
        ALTER TABLE award_procurement ADD veterinary_college_temp boolean;
        ALTER TABLE award_procurement ADD educational_institution_temp boolean;
        ALTER TABLE award_procurement ADD alaskan_native_servicing_i_temp boolean;
        ALTER TABLE award_procurement ADD community_development_corp_temp boolean;
        ALTER TABLE award_procurement ADD native_hawaiian_servicing_temp boolean;
        ALTER TABLE award_procurement ADD domestic_shelter_temp boolean;
        ALTER TABLE award_procurement ADD manufacturer_of_goods_temp boolean;
        ALTER TABLE award_procurement ADD hospital_flag_temp boolean;
        ALTER TABLE award_procurement ADD veterinary_hospital_temp boolean;
        ALTER TABLE award_procurement ADD hispanic_servicing_institu_temp boolean;
        ALTER TABLE award_procurement ADD foundation_temp boolean;
        ALTER TABLE award_procurement ADD woman_owned_business_temp boolean;
        ALTER TABLE award_procurement ADD minority_owned_business_temp boolean;
        ALTER TABLE award_procurement ADD women_owned_small_business_temp boolean;
        ALTER TABLE award_procurement ADD economically_disadvantaged_temp boolean;
        ALTER TABLE award_procurement ADD joint_venture_women_owned_temp boolean;
        ALTER TABLE award_procurement ADD joint_venture_economically_temp boolean;
        ALTER TABLE award_procurement ADD veteran_owned_business_temp boolean;
        ALTER TABLE award_procurement ADD service_disabled_veteran_o_temp boolean;
        ALTER TABLE award_procurement ADD contracts_temp boolean;
        ALTER TABLE award_procurement ADD grants_temp boolean;
        ALTER TABLE award_procurement ADD receives_contracts_and_gra_temp boolean;
        ALTER TABLE award_procurement ADD airport_authority_temp boolean;
        ALTER TABLE award_procurement ADD council_of_governments_temp boolean;
        ALTER TABLE award_procurement ADD housing_authorities_public_temp boolean;
        ALTER TABLE award_procurement ADD interstate_entity_temp boolean;
        ALTER TABLE award_procurement ADD planning_commission_temp boolean;
        ALTER TABLE award_procurement ADD port_authority_temp boolean;
        ALTER TABLE award_procurement ADD transit_authority_temp boolean;
        ALTER TABLE award_procurement ADD subchapter_s_corporation_temp boolean;
        ALTER TABLE award_procurement ADD limited_liability_corporat_temp boolean;
        ALTER TABLE award_procurement ADD foreign_owned_and_located_temp boolean;
        ALTER TABLE award_procurement ADD american_indian_owned_busi_temp boolean;
        ALTER TABLE award_procurement ADD alaskan_native_owned_corpo_temp boolean;
        ALTER TABLE award_procurement ADD indian_tribe_federally_rec_temp boolean;
        ALTER TABLE award_procurement ADD native_hawaiian_owned_busi_temp boolean;
        ALTER TABLE award_procurement ADD tribally_owned_business_temp boolean;
        ALTER TABLE award_procurement ADD asian_pacific_american_own_temp boolean;
        ALTER TABLE award_procurement ADD black_american_owned_busin_temp boolean;
        ALTER TABLE award_procurement ADD hispanic_american_owned_bu_temp boolean;
        ALTER TABLE award_procurement ADD native_american_owned_busi_temp boolean;
        ALTER TABLE award_procurement ADD subcontinent_asian_asian_i_temp boolean;
        ALTER TABLE award_procurement ADD other_minority_owned_busin_temp boolean;
        ALTER TABLE award_procurement ADD for_profit_organization_temp boolean;
        ALTER TABLE award_procurement ADD nonprofit_organization_temp boolean;
        ALTER TABLE award_procurement ADD other_not_for_profit_organ_temp boolean;
        ALTER TABLE award_procurement ADD us_local_government_temp boolean;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE award_procurement
        SET
            small_business_competitive_temp = small_business_competitive::boolean,
            city_local_government_temp = city_local_government::boolean,
            county_local_government_temp = county_local_government::boolean,
            inter_municipal_local_gove_temp = inter_municipal_local_gove::boolean,
            local_government_owned_temp = local_government_owned::boolean,
            municipality_local_governm_temp = municipality_local_governm::boolean,
            school_district_local_gove_temp = school_district_local_gove::boolean,
            township_local_government_temp = township_local_government::boolean,
            us_state_government_temp = us_state_government::boolean,
            us_federal_government_temp = us_federal_government::boolean,
            federal_agency_temp = federal_agency::boolean,
            federally_funded_research_temp = federally_funded_research::boolean,
            us_tribal_government_temp = us_tribal_government::boolean,
            foreign_government_temp = foreign_government::boolean,
            community_developed_corpor_temp = community_developed_corpor::boolean,
            labor_surplus_area_firm_temp = labor_surplus_area_firm::boolean,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e::boolean,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp::boolean,
            partnership_or_limited_lia_temp = partnership_or_limited_lia::boolean,
            sole_proprietorship_temp = sole_proprietorship::boolean,
            small_agricultural_coopera_temp = small_agricultural_coopera::boolean,
            international_organization_temp = international_organization::boolean,
            us_government_entity_temp = us_government_entity::boolean,
            emerging_small_business_temp = emerging_small_business::boolean,
            c8a_program_participant_temp = c8a_program_participant::boolean,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve::boolean,
            dot_certified_disadvantage_temp = dot_certified_disadvantage::boolean,
            self_certified_small_disad_temp = self_certified_small_disad::boolean,
            historically_underutilized_temp = historically_underutilized::boolean,
            small_disadvantaged_busine_temp = small_disadvantaged_busine::boolean,
            the_ability_one_program_temp = the_ability_one_program::boolean,
            historically_black_college_temp = historically_black_college::boolean,
            c1862_land_grant_college_temp = c1862_land_grant_college::boolean,
            c1890_land_grant_college_temp = c1890_land_grant_college::boolean,
            c1994_land_grant_college_temp = c1994_land_grant_college::boolean,
            minority_institution_temp = minority_institution::boolean,
            private_university_or_coll_temp = private_university_or_coll::boolean,
            school_of_forestry_temp = school_of_forestry::boolean,
            state_controlled_instituti_temp = state_controlled_instituti::boolean,
            tribal_college_temp = tribal_college::boolean,
            veterinary_college_temp = veterinary_college::boolean,
            educational_institution_temp = educational_institution::boolean,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i::boolean,
            community_development_corp_temp = community_development_corp::boolean,
            native_hawaiian_servicing_temp = native_hawaiian_servicing::boolean,
            domestic_shelter_temp = domestic_shelter::boolean,
            manufacturer_of_goods_temp = manufacturer_of_goods::boolean,
            hospital_flag_temp = hospital_flag::boolean,
            veterinary_hospital_temp = veterinary_hospital::boolean,
            hispanic_servicing_institu_temp = hispanic_servicing_institu::boolean,
            foundation_temp = foundation::boolean,
            woman_owned_business_temp = woman_owned_business::boolean,
            minority_owned_business_temp = minority_owned_business::boolean,
            women_owned_small_business_temp = women_owned_small_business::boolean,
            economically_disadvantaged_temp = economically_disadvantaged::boolean,
            joint_venture_women_owned_temp = joint_venture_women_owned::boolean,
            joint_venture_economically_temp = joint_venture_economically::boolean,
            veteran_owned_business_temp = veteran_owned_business::boolean,
            service_disabled_veteran_o_temp = service_disabled_veteran_o::boolean,
            contracts_temp = contracts::boolean,
            grants_temp = grants::boolean,
            receives_contracts_and_gra_temp = receives_contracts_and_gra::boolean,
            airport_authority_temp = airport_authority::boolean,
            council_of_governments_temp = council_of_governments::boolean,
            housing_authorities_public_temp = housing_authorities_public::boolean,
            interstate_entity_temp = interstate_entity::boolean,
            planning_commission_temp = planning_commission::boolean,
            port_authority_temp = port_authority::boolean,
            transit_authority_temp = transit_authority::boolean,
            subchapter_s_corporation_temp = subchapter_s_corporation::boolean,
            limited_liability_corporat_temp = limited_liability_corporat::boolean,
            foreign_owned_and_located_temp = foreign_owned_and_located::boolean,
            american_indian_owned_busi_temp = american_indian_owned_busi::boolean,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo::boolean,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec::boolean,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi::boolean,
            tribally_owned_business_temp = tribally_owned_business::boolean,
            asian_pacific_american_own_temp = asian_pacific_american_own::boolean,
            black_american_owned_busin_temp = black_american_owned_busin::boolean,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu::boolean,
            native_american_owned_busi_temp = native_american_owned_busi::boolean,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i::boolean,
            other_minority_owned_busin_temp = other_minority_owned_busin::boolean,
            for_profit_organization_temp = for_profit_organization::boolean,
            nonprofit_organization_temp = nonprofit_organization::boolean,
            other_not_for_profit_organ_temp = other_not_for_profit_organ::boolean,
            us_local_government_temp = us_local_government::boolean
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE award_procurement DROP COLUMN city_local_government;
        ALTER TABLE award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE award_procurement DROP COLUMN county_local_government;
        ALTER TABLE award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE award_procurement DROP COLUMN township_local_government;
        ALTER TABLE award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE award_procurement DROP COLUMN us_state_government;
        ALTER TABLE award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE award_procurement DROP COLUMN federal_agency;
        ALTER TABLE award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE award_procurement DROP COLUMN foreign_government;
        ALTER TABLE award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE award_procurement DROP COLUMN international_organization;
        ALTER TABLE award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN minority_institution;
        ALTER TABLE award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE award_procurement DROP COLUMN tribal_college;
        ALTER TABLE award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE award_procurement DROP COLUMN educational_institution;
        ALTER TABLE award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE award_procurement DROP COLUMN foundation;
        ALTER TABLE award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE award_procurement DROP COLUMN contracts;
        ALTER TABLE award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE award_procurement DROP COLUMN grants;
        ALTER TABLE award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE award_procurement DROP COLUMN airport_authority;
        ALTER TABLE award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE award_procurement DROP COLUMN planning_commission;
        ALTER TABLE award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE award_procurement DROP COLUMN port_authority;
        ALTER TABLE award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE award_procurement DROP COLUMN transit_authority;
        ALTER TABLE award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE award_procurement DROP COLUMN us_local_government;
        ALTER TABLE award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)

    # Detached Award Procurement
    # Add temp columns
    op.execute("""
        ALTER TABLE detached_award_procurement ADD small_business_competitive_temp boolean;
        ALTER TABLE detached_award_procurement ADD city_local_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD county_local_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD inter_municipal_local_gove_temp boolean;
        ALTER TABLE detached_award_procurement ADD local_government_owned_temp boolean;
        ALTER TABLE detached_award_procurement ADD municipality_local_governm_temp boolean;
        ALTER TABLE detached_award_procurement ADD school_district_local_gove_temp boolean;
        ALTER TABLE detached_award_procurement ADD township_local_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD us_state_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD us_federal_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD federal_agency_temp boolean;
        ALTER TABLE detached_award_procurement ADD federally_funded_research_temp boolean;
        ALTER TABLE detached_award_procurement ADD us_tribal_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD foreign_government_temp boolean;
        ALTER TABLE detached_award_procurement ADD community_developed_corpor_temp boolean;
        ALTER TABLE detached_award_procurement ADD labor_surplus_area_firm_temp boolean;
        ALTER TABLE detached_award_procurement ADD corporate_entity_not_tax_e_temp boolean;
        ALTER TABLE detached_award_procurement ADD corporate_entity_tax_exemp_temp boolean;
        ALTER TABLE detached_award_procurement ADD partnership_or_limited_lia_temp boolean;
        ALTER TABLE detached_award_procurement ADD sole_proprietorship_temp boolean;
        ALTER TABLE detached_award_procurement ADD small_agricultural_coopera_temp boolean;
        ALTER TABLE detached_award_procurement ADD international_organization_temp boolean;
        ALTER TABLE detached_award_procurement ADD us_government_entity_temp boolean;
        ALTER TABLE detached_award_procurement ADD emerging_small_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD c8a_program_participant_temp boolean;
        ALTER TABLE detached_award_procurement ADD sba_certified_8_a_joint_ve_temp boolean;
        ALTER TABLE detached_award_procurement ADD dot_certified_disadvantage_temp boolean;
        ALTER TABLE detached_award_procurement ADD self_certified_small_disad_temp boolean;
        ALTER TABLE detached_award_procurement ADD historically_underutilized_temp boolean;
        ALTER TABLE detached_award_procurement ADD small_disadvantaged_busine_temp boolean;
        ALTER TABLE detached_award_procurement ADD the_ability_one_program_temp boolean;
        ALTER TABLE detached_award_procurement ADD historically_black_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD c1862_land_grant_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD c1890_land_grant_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD c1994_land_grant_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD minority_institution_temp boolean;
        ALTER TABLE detached_award_procurement ADD private_university_or_coll_temp boolean;
        ALTER TABLE detached_award_procurement ADD school_of_forestry_temp boolean;
        ALTER TABLE detached_award_procurement ADD state_controlled_instituti_temp boolean;
        ALTER TABLE detached_award_procurement ADD tribal_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD veterinary_college_temp boolean;
        ALTER TABLE detached_award_procurement ADD educational_institution_temp boolean;
        ALTER TABLE detached_award_procurement ADD alaskan_native_servicing_i_temp boolean;
        ALTER TABLE detached_award_procurement ADD community_development_corp_temp boolean;
        ALTER TABLE detached_award_procurement ADD native_hawaiian_servicing_temp boolean;
        ALTER TABLE detached_award_procurement ADD domestic_shelter_temp boolean;
        ALTER TABLE detached_award_procurement ADD manufacturer_of_goods_temp boolean;
        ALTER TABLE detached_award_procurement ADD hospital_flag_temp boolean;
        ALTER TABLE detached_award_procurement ADD veterinary_hospital_temp boolean;
        ALTER TABLE detached_award_procurement ADD hispanic_servicing_institu_temp boolean;
        ALTER TABLE detached_award_procurement ADD foundation_temp boolean;
        ALTER TABLE detached_award_procurement ADD woman_owned_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD minority_owned_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD women_owned_small_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD economically_disadvantaged_temp boolean;
        ALTER TABLE detached_award_procurement ADD joint_venture_women_owned_temp boolean;
        ALTER TABLE detached_award_procurement ADD joint_venture_economically_temp boolean;
        ALTER TABLE detached_award_procurement ADD veteran_owned_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD service_disabled_veteran_o_temp boolean;
        ALTER TABLE detached_award_procurement ADD contracts_temp boolean;
        ALTER TABLE detached_award_procurement ADD grants_temp boolean;
        ALTER TABLE detached_award_procurement ADD receives_contracts_and_gra_temp boolean;
        ALTER TABLE detached_award_procurement ADD airport_authority_temp boolean;
        ALTER TABLE detached_award_procurement ADD council_of_governments_temp boolean;
        ALTER TABLE detached_award_procurement ADD housing_authorities_public_temp boolean;
        ALTER TABLE detached_award_procurement ADD interstate_entity_temp boolean;
        ALTER TABLE detached_award_procurement ADD planning_commission_temp boolean;
        ALTER TABLE detached_award_procurement ADD port_authority_temp boolean;
        ALTER TABLE detached_award_procurement ADD transit_authority_temp boolean;
        ALTER TABLE detached_award_procurement ADD subchapter_s_corporation_temp boolean;
        ALTER TABLE detached_award_procurement ADD limited_liability_corporat_temp boolean;
        ALTER TABLE detached_award_procurement ADD foreign_owned_and_located_temp boolean;
        ALTER TABLE detached_award_procurement ADD american_indian_owned_busi_temp boolean;
        ALTER TABLE detached_award_procurement ADD alaskan_native_owned_corpo_temp boolean;
        ALTER TABLE detached_award_procurement ADD indian_tribe_federally_rec_temp boolean;
        ALTER TABLE detached_award_procurement ADD native_hawaiian_owned_busi_temp boolean;
        ALTER TABLE detached_award_procurement ADD tribally_owned_business_temp boolean;
        ALTER TABLE detached_award_procurement ADD asian_pacific_american_own_temp boolean;
        ALTER TABLE detached_award_procurement ADD black_american_owned_busin_temp boolean;
        ALTER TABLE detached_award_procurement ADD hispanic_american_owned_bu_temp boolean;
        ALTER TABLE detached_award_procurement ADD native_american_owned_busi_temp boolean;
        ALTER TABLE detached_award_procurement ADD subcontinent_asian_asian_i_temp boolean;
        ALTER TABLE detached_award_procurement ADD other_minority_owned_busin_temp boolean;
        ALTER TABLE detached_award_procurement ADD for_profit_organization_temp boolean;
        ALTER TABLE detached_award_procurement ADD nonprofit_organization_temp boolean;
        ALTER TABLE detached_award_procurement ADD other_not_for_profit_organ_temp boolean;
        ALTER TABLE detached_award_procurement ADD us_local_government_temp boolean;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE detached_award_procurement
        SET
            small_business_competitive_temp = small_business_competitive::boolean,
            city_local_government_temp = city_local_government::boolean,
            county_local_government_temp = county_local_government::boolean,
            inter_municipal_local_gove_temp = inter_municipal_local_gove::boolean,
            local_government_owned_temp = local_government_owned::boolean,
            municipality_local_governm_temp = municipality_local_governm::boolean,
            school_district_local_gove_temp = school_district_local_gove::boolean,
            township_local_government_temp = township_local_government::boolean,
            us_state_government_temp = us_state_government::boolean,
            us_federal_government_temp = us_federal_government::boolean,
            federal_agency_temp = federal_agency::boolean,
            federally_funded_research_temp = federally_funded_research::boolean,
            us_tribal_government_temp = us_tribal_government::boolean,
            foreign_government_temp = foreign_government::boolean,
            community_developed_corpor_temp = community_developed_corpor::boolean,
            labor_surplus_area_firm_temp = labor_surplus_area_firm::boolean,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e::boolean,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp::boolean,
            partnership_or_limited_lia_temp = partnership_or_limited_lia::boolean,
            sole_proprietorship_temp = sole_proprietorship::boolean,
            small_agricultural_coopera_temp = small_agricultural_coopera::boolean,
            international_organization_temp = international_organization::boolean,
            us_government_entity_temp = us_government_entity::boolean,
            emerging_small_business_temp = emerging_small_business::boolean,
            c8a_program_participant_temp = c8a_program_participant::boolean,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve::boolean,
            dot_certified_disadvantage_temp = dot_certified_disadvantage::boolean,
            self_certified_small_disad_temp = self_certified_small_disad::boolean,
            historically_underutilized_temp = historically_underutilized::boolean,
            small_disadvantaged_busine_temp = small_disadvantaged_busine::boolean,
            the_ability_one_program_temp = the_ability_one_program::boolean,
            historically_black_college_temp = historically_black_college::boolean,
            c1862_land_grant_college_temp = c1862_land_grant_college::boolean,
            c1890_land_grant_college_temp = c1890_land_grant_college::boolean,
            c1994_land_grant_college_temp = c1994_land_grant_college::boolean,
            minority_institution_temp = minority_institution::boolean,
            private_university_or_coll_temp = private_university_or_coll::boolean,
            school_of_forestry_temp = school_of_forestry::boolean,
            state_controlled_instituti_temp = state_controlled_instituti::boolean,
            tribal_college_temp = tribal_college::boolean,
            veterinary_college_temp = veterinary_college::boolean,
            educational_institution_temp = educational_institution::boolean,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i::boolean,
            community_development_corp_temp = community_development_corp::boolean,
            native_hawaiian_servicing_temp = native_hawaiian_servicing::boolean,
            domestic_shelter_temp = domestic_shelter::boolean,
            manufacturer_of_goods_temp = manufacturer_of_goods::boolean,
            hospital_flag_temp = hospital_flag::boolean,
            veterinary_hospital_temp = veterinary_hospital::boolean,
            hispanic_servicing_institu_temp = hispanic_servicing_institu::boolean,
            foundation_temp = foundation::boolean,
            woman_owned_business_temp = woman_owned_business::boolean,
            minority_owned_business_temp = minority_owned_business::boolean,
            women_owned_small_business_temp = women_owned_small_business::boolean,
            economically_disadvantaged_temp = economically_disadvantaged::boolean,
            joint_venture_women_owned_temp = joint_venture_women_owned::boolean,
            joint_venture_economically_temp = joint_venture_economically::boolean,
            veteran_owned_business_temp = veteran_owned_business::boolean,
            service_disabled_veteran_o_temp = service_disabled_veteran_o::boolean,
            contracts_temp = contracts::boolean,
            grants_temp = grants::boolean,
            receives_contracts_and_gra_temp = receives_contracts_and_gra::boolean,
            airport_authority_temp = airport_authority::boolean,
            council_of_governments_temp = council_of_governments::boolean,
            housing_authorities_public_temp = housing_authorities_public::boolean,
            interstate_entity_temp = interstate_entity::boolean,
            planning_commission_temp = planning_commission::boolean,
            port_authority_temp = port_authority::boolean,
            transit_authority_temp = transit_authority::boolean,
            subchapter_s_corporation_temp = subchapter_s_corporation::boolean,
            limited_liability_corporat_temp = limited_liability_corporat::boolean,
            foreign_owned_and_located_temp = foreign_owned_and_located::boolean,
            american_indian_owned_busi_temp = american_indian_owned_busi::boolean,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo::boolean,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec::boolean,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi::boolean,
            tribally_owned_business_temp = tribally_owned_business::boolean,
            asian_pacific_american_own_temp = asian_pacific_american_own::boolean,
            black_american_owned_busin_temp = black_american_owned_busin::boolean,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu::boolean,
            native_american_owned_busi_temp = native_american_owned_busi::boolean,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i::boolean,
            other_minority_owned_busin_temp = other_minority_owned_busin::boolean,
            for_profit_organization_temp = for_profit_organization::boolean,
            nonprofit_organization_temp = nonprofit_organization::boolean,
            other_not_for_profit_organ_temp = other_not_for_profit_organ::boolean,
            us_local_government_temp = us_local_government::boolean
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE detached_award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE detached_award_procurement DROP COLUMN city_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN county_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE detached_award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE detached_award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE detached_award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE detached_award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE detached_award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE detached_award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE detached_award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE detached_award_procurement DROP COLUMN township_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN us_state_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE detached_award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE detached_award_procurement DROP COLUMN federal_agency;
        ALTER TABLE detached_award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE detached_award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE detached_award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE detached_award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE detached_award_procurement DROP COLUMN foreign_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE detached_award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE detached_award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE detached_award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE detached_award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE detached_award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE detached_award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE detached_award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE detached_award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE detached_award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE detached_award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE detached_award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE detached_award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE detached_award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE detached_award_procurement DROP COLUMN international_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE detached_award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE detached_award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE detached_award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE detached_award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE detached_award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE detached_award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE detached_award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE detached_award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE detached_award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE detached_award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE detached_award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE detached_award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE detached_award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE detached_award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE detached_award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN minority_institution;
        ALTER TABLE detached_award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE detached_award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE detached_award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE detached_award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE detached_award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE detached_award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE detached_award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE detached_award_procurement DROP COLUMN tribal_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE detached_award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE detached_award_procurement DROP COLUMN educational_institution;
        ALTER TABLE detached_award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE detached_award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE detached_award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE detached_award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE detached_award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE detached_award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE detached_award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE detached_award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE detached_award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE detached_award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE detached_award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE detached_award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE detached_award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE detached_award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE detached_award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE detached_award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE detached_award_procurement DROP COLUMN foundation;
        ALTER TABLE detached_award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE detached_award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE detached_award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE detached_award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE detached_award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE detached_award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE detached_award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE detached_award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE detached_award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE detached_award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE detached_award_procurement DROP COLUMN contracts;
        ALTER TABLE detached_award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE detached_award_procurement DROP COLUMN grants;
        ALTER TABLE detached_award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE detached_award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE detached_award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE detached_award_procurement DROP COLUMN airport_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE detached_award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE detached_award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE detached_award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE detached_award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE detached_award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE detached_award_procurement DROP COLUMN planning_commission;
        ALTER TABLE detached_award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE detached_award_procurement DROP COLUMN port_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN transit_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE detached_award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE detached_award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE detached_award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE detached_award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE detached_award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE detached_award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE detached_award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE detached_award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE detached_award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE detached_award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE detached_award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE detached_award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE detached_award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE detached_award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE detached_award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE detached_award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE detached_award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE detached_award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE detached_award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE detached_award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE detached_award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE detached_award_procurement DROP COLUMN us_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)

    # Certified Award Procurement
    # Add temp columns
    op.execute("""
        ALTER TABLE certified_award_procurement ADD small_business_competitive_temp boolean;
        ALTER TABLE certified_award_procurement ADD city_local_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD county_local_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD inter_municipal_local_gove_temp boolean;
        ALTER TABLE certified_award_procurement ADD local_government_owned_temp boolean;
        ALTER TABLE certified_award_procurement ADD municipality_local_governm_temp boolean;
        ALTER TABLE certified_award_procurement ADD school_district_local_gove_temp boolean;
        ALTER TABLE certified_award_procurement ADD township_local_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD us_state_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD us_federal_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD federal_agency_temp boolean;
        ALTER TABLE certified_award_procurement ADD federally_funded_research_temp boolean;
        ALTER TABLE certified_award_procurement ADD us_tribal_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD foreign_government_temp boolean;
        ALTER TABLE certified_award_procurement ADD community_developed_corpor_temp boolean;
        ALTER TABLE certified_award_procurement ADD labor_surplus_area_firm_temp boolean;
        ALTER TABLE certified_award_procurement ADD corporate_entity_not_tax_e_temp boolean;
        ALTER TABLE certified_award_procurement ADD corporate_entity_tax_exemp_temp boolean;
        ALTER TABLE certified_award_procurement ADD partnership_or_limited_lia_temp boolean;
        ALTER TABLE certified_award_procurement ADD sole_proprietorship_temp boolean;
        ALTER TABLE certified_award_procurement ADD small_agricultural_coopera_temp boolean;
        ALTER TABLE certified_award_procurement ADD international_organization_temp boolean;
        ALTER TABLE certified_award_procurement ADD us_government_entity_temp boolean;
        ALTER TABLE certified_award_procurement ADD emerging_small_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD c8a_program_participant_temp boolean;
        ALTER TABLE certified_award_procurement ADD sba_certified_8_a_joint_ve_temp boolean;
        ALTER TABLE certified_award_procurement ADD dot_certified_disadvantage_temp boolean;
        ALTER TABLE certified_award_procurement ADD self_certified_small_disad_temp boolean;
        ALTER TABLE certified_award_procurement ADD historically_underutilized_temp boolean;
        ALTER TABLE certified_award_procurement ADD small_disadvantaged_busine_temp boolean;
        ALTER TABLE certified_award_procurement ADD the_ability_one_program_temp boolean;
        ALTER TABLE certified_award_procurement ADD historically_black_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD c1862_land_grant_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD c1890_land_grant_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD c1994_land_grant_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD minority_institution_temp boolean;
        ALTER TABLE certified_award_procurement ADD private_university_or_coll_temp boolean;
        ALTER TABLE certified_award_procurement ADD school_of_forestry_temp boolean;
        ALTER TABLE certified_award_procurement ADD state_controlled_instituti_temp boolean;
        ALTER TABLE certified_award_procurement ADD tribal_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD veterinary_college_temp boolean;
        ALTER TABLE certified_award_procurement ADD educational_institution_temp boolean;
        ALTER TABLE certified_award_procurement ADD alaskan_native_servicing_i_temp boolean;
        ALTER TABLE certified_award_procurement ADD community_development_corp_temp boolean;
        ALTER TABLE certified_award_procurement ADD native_hawaiian_servicing_temp boolean;
        ALTER TABLE certified_award_procurement ADD domestic_shelter_temp boolean;
        ALTER TABLE certified_award_procurement ADD manufacturer_of_goods_temp boolean;
        ALTER TABLE certified_award_procurement ADD hospital_flag_temp boolean;
        ALTER TABLE certified_award_procurement ADD veterinary_hospital_temp boolean;
        ALTER TABLE certified_award_procurement ADD hispanic_servicing_institu_temp boolean;
        ALTER TABLE certified_award_procurement ADD foundation_temp boolean;
        ALTER TABLE certified_award_procurement ADD woman_owned_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD minority_owned_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD women_owned_small_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD economically_disadvantaged_temp boolean;
        ALTER TABLE certified_award_procurement ADD joint_venture_women_owned_temp boolean;
        ALTER TABLE certified_award_procurement ADD joint_venture_economically_temp boolean;
        ALTER TABLE certified_award_procurement ADD veteran_owned_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD service_disabled_veteran_o_temp boolean;
        ALTER TABLE certified_award_procurement ADD contracts_temp boolean;
        ALTER TABLE certified_award_procurement ADD grants_temp boolean;
        ALTER TABLE certified_award_procurement ADD receives_contracts_and_gra_temp boolean;
        ALTER TABLE certified_award_procurement ADD airport_authority_temp boolean;
        ALTER TABLE certified_award_procurement ADD council_of_governments_temp boolean;
        ALTER TABLE certified_award_procurement ADD housing_authorities_public_temp boolean;
        ALTER TABLE certified_award_procurement ADD interstate_entity_temp boolean;
        ALTER TABLE certified_award_procurement ADD planning_commission_temp boolean;
        ALTER TABLE certified_award_procurement ADD port_authority_temp boolean;
        ALTER TABLE certified_award_procurement ADD transit_authority_temp boolean;
        ALTER TABLE certified_award_procurement ADD subchapter_s_corporation_temp boolean;
        ALTER TABLE certified_award_procurement ADD limited_liability_corporat_temp boolean;
        ALTER TABLE certified_award_procurement ADD foreign_owned_and_located_temp boolean;
        ALTER TABLE certified_award_procurement ADD american_indian_owned_busi_temp boolean;
        ALTER TABLE certified_award_procurement ADD alaskan_native_owned_corpo_temp boolean;
        ALTER TABLE certified_award_procurement ADD indian_tribe_federally_rec_temp boolean;
        ALTER TABLE certified_award_procurement ADD native_hawaiian_owned_busi_temp boolean;
        ALTER TABLE certified_award_procurement ADD tribally_owned_business_temp boolean;
        ALTER TABLE certified_award_procurement ADD asian_pacific_american_own_temp boolean;
        ALTER TABLE certified_award_procurement ADD black_american_owned_busin_temp boolean;
        ALTER TABLE certified_award_procurement ADD hispanic_american_owned_bu_temp boolean;
        ALTER TABLE certified_award_procurement ADD native_american_owned_busi_temp boolean;
        ALTER TABLE certified_award_procurement ADD subcontinent_asian_asian_i_temp boolean;
        ALTER TABLE certified_award_procurement ADD other_minority_owned_busin_temp boolean;
        ALTER TABLE certified_award_procurement ADD for_profit_organization_temp boolean;
        ALTER TABLE certified_award_procurement ADD nonprofit_organization_temp boolean;
        ALTER TABLE certified_award_procurement ADD other_not_for_profit_organ_temp boolean;
        ALTER TABLE certified_award_procurement ADD us_local_government_temp boolean;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE certified_award_procurement
        SET
            small_business_competitive_temp = small_business_competitive::boolean,
            city_local_government_temp = city_local_government::boolean,
            county_local_government_temp = county_local_government::boolean,
            inter_municipal_local_gove_temp = inter_municipal_local_gove::boolean,
            local_government_owned_temp = local_government_owned::boolean,
            municipality_local_governm_temp = municipality_local_governm::boolean,
            school_district_local_gove_temp = school_district_local_gove::boolean,
            township_local_government_temp = township_local_government::boolean,
            us_state_government_temp = us_state_government::boolean,
            us_federal_government_temp = us_federal_government::boolean,
            federal_agency_temp = federal_agency::boolean,
            federally_funded_research_temp = federally_funded_research::boolean,
            us_tribal_government_temp = us_tribal_government::boolean,
            foreign_government_temp = foreign_government::boolean,
            community_developed_corpor_temp = community_developed_corpor::boolean,
            labor_surplus_area_firm_temp = labor_surplus_area_firm::boolean,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e::boolean,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp::boolean,
            partnership_or_limited_lia_temp = partnership_or_limited_lia::boolean,
            sole_proprietorship_temp = sole_proprietorship::boolean,
            small_agricultural_coopera_temp = small_agricultural_coopera::boolean,
            international_organization_temp = international_organization::boolean,
            us_government_entity_temp = us_government_entity::boolean,
            emerging_small_business_temp = emerging_small_business::boolean,
            c8a_program_participant_temp = c8a_program_participant::boolean,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve::boolean,
            dot_certified_disadvantage_temp = dot_certified_disadvantage::boolean,
            self_certified_small_disad_temp = self_certified_small_disad::boolean,
            historically_underutilized_temp = historically_underutilized::boolean,
            small_disadvantaged_busine_temp = small_disadvantaged_busine::boolean,
            the_ability_one_program_temp = the_ability_one_program::boolean,
            historically_black_college_temp = historically_black_college::boolean,
            c1862_land_grant_college_temp = c1862_land_grant_college::boolean,
            c1890_land_grant_college_temp = c1890_land_grant_college::boolean,
            c1994_land_grant_college_temp = c1994_land_grant_college::boolean,
            minority_institution_temp = minority_institution::boolean,
            private_university_or_coll_temp = private_university_or_coll::boolean,
            school_of_forestry_temp = school_of_forestry::boolean,
            state_controlled_instituti_temp = state_controlled_instituti::boolean,
            tribal_college_temp = tribal_college::boolean,
            veterinary_college_temp = veterinary_college::boolean,
            educational_institution_temp = educational_institution::boolean,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i::boolean,
            community_development_corp_temp = community_development_corp::boolean,
            native_hawaiian_servicing_temp = native_hawaiian_servicing::boolean,
            domestic_shelter_temp = domestic_shelter::boolean,
            manufacturer_of_goods_temp = manufacturer_of_goods::boolean,
            hospital_flag_temp = hospital_flag::boolean,
            veterinary_hospital_temp = veterinary_hospital::boolean,
            hispanic_servicing_institu_temp = hispanic_servicing_institu::boolean,
            foundation_temp = foundation::boolean,
            woman_owned_business_temp = woman_owned_business::boolean,
            minority_owned_business_temp = minority_owned_business::boolean,
            women_owned_small_business_temp = women_owned_small_business::boolean,
            economically_disadvantaged_temp = economically_disadvantaged::boolean,
            joint_venture_women_owned_temp = joint_venture_women_owned::boolean,
            joint_venture_economically_temp = joint_venture_economically::boolean,
            veteran_owned_business_temp = veteran_owned_business::boolean,
            service_disabled_veteran_o_temp = service_disabled_veteran_o::boolean,
            contracts_temp = contracts::boolean,
            grants_temp = grants::boolean,
            receives_contracts_and_gra_temp = receives_contracts_and_gra::boolean,
            airport_authority_temp = airport_authority::boolean,
            council_of_governments_temp = council_of_governments::boolean,
            housing_authorities_public_temp = housing_authorities_public::boolean,
            interstate_entity_temp = interstate_entity::boolean,
            planning_commission_temp = planning_commission::boolean,
            port_authority_temp = port_authority::boolean,
            transit_authority_temp = transit_authority::boolean,
            subchapter_s_corporation_temp = subchapter_s_corporation::boolean,
            limited_liability_corporat_temp = limited_liability_corporat::boolean,
            foreign_owned_and_located_temp = foreign_owned_and_located::boolean,
            american_indian_owned_busi_temp = american_indian_owned_busi::boolean,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo::boolean,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec::boolean,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi::boolean,
            tribally_owned_business_temp = tribally_owned_business::boolean,
            asian_pacific_american_own_temp = asian_pacific_american_own::boolean,
            black_american_owned_busin_temp = black_american_owned_busin::boolean,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu::boolean,
            native_american_owned_busi_temp = native_american_owned_busi::boolean,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i::boolean,
            other_minority_owned_busin_temp = other_minority_owned_busin::boolean,
            for_profit_organization_temp = for_profit_organization::boolean,
            nonprofit_organization_temp = nonprofit_organization::boolean,
            other_not_for_profit_organ_temp = other_not_for_profit_organ::boolean,
            us_local_government_temp = us_local_government::boolean
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE certified_award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE certified_award_procurement DROP COLUMN city_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN county_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE certified_award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE certified_award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE certified_award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE certified_award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE certified_award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE certified_award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE certified_award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE certified_award_procurement DROP COLUMN township_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN us_state_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE certified_award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE certified_award_procurement DROP COLUMN federal_agency;
        ALTER TABLE certified_award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE certified_award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE certified_award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE certified_award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE certified_award_procurement DROP COLUMN foreign_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE certified_award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE certified_award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE certified_award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE certified_award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE certified_award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE certified_award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE certified_award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE certified_award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE certified_award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE certified_award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE certified_award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE certified_award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE certified_award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE certified_award_procurement DROP COLUMN international_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE certified_award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE certified_award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE certified_award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE certified_award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE certified_award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE certified_award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE certified_award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE certified_award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE certified_award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE certified_award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE certified_award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE certified_award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE certified_award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE certified_award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE certified_award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN minority_institution;
        ALTER TABLE certified_award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE certified_award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE certified_award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE certified_award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE certified_award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE certified_award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE certified_award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE certified_award_procurement DROP COLUMN tribal_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE certified_award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE certified_award_procurement DROP COLUMN educational_institution;
        ALTER TABLE certified_award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE certified_award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE certified_award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE certified_award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE certified_award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE certified_award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE certified_award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE certified_award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE certified_award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE certified_award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE certified_award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE certified_award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE certified_award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE certified_award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE certified_award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE certified_award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE certified_award_procurement DROP COLUMN foundation;
        ALTER TABLE certified_award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE certified_award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE certified_award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE certified_award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE certified_award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE certified_award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE certified_award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE certified_award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE certified_award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE certified_award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE certified_award_procurement DROP COLUMN contracts;
        ALTER TABLE certified_award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE certified_award_procurement DROP COLUMN grants;
        ALTER TABLE certified_award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE certified_award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE certified_award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE certified_award_procurement DROP COLUMN airport_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE certified_award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE certified_award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE certified_award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE certified_award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE certified_award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE certified_award_procurement DROP COLUMN planning_commission;
        ALTER TABLE certified_award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE certified_award_procurement DROP COLUMN port_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN transit_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE certified_award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE certified_award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE certified_award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE certified_award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE certified_award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE certified_award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE certified_award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE certified_award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE certified_award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE certified_award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE certified_award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE certified_award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE certified_award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE certified_award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE certified_award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE certified_award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE certified_award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE certified_award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE certified_award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE certified_award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE certified_award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE certified_award_procurement DROP COLUMN us_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    # Award Procurement
    # Add temp text
    op.execute("""
        ALTER TABLE award_procurement ADD small_business_competitive_temp text;
        ALTER TABLE award_procurement ADD city_local_government_temp text;
        ALTER TABLE award_procurement ADD county_local_government_temp text;
        ALTER TABLE award_procurement ADD inter_municipal_local_gove_temp text;
        ALTER TABLE award_procurement ADD local_government_owned_temp text;
        ALTER TABLE award_procurement ADD municipality_local_governm_temp text;
        ALTER TABLE award_procurement ADD school_district_local_gove_temp text;
        ALTER TABLE award_procurement ADD township_local_government_temp text;
        ALTER TABLE award_procurement ADD us_state_government_temp text;
        ALTER TABLE award_procurement ADD us_federal_government_temp text;
        ALTER TABLE award_procurement ADD federal_agency_temp text;
        ALTER TABLE award_procurement ADD federally_funded_research_temp text;
        ALTER TABLE award_procurement ADD us_tribal_government_temp text;
        ALTER TABLE award_procurement ADD foreign_government_temp text;
        ALTER TABLE award_procurement ADD community_developed_corpor_temp text;
        ALTER TABLE award_procurement ADD labor_surplus_area_firm_temp text;
        ALTER TABLE award_procurement ADD corporate_entity_not_tax_e_temp text;
        ALTER TABLE award_procurement ADD corporate_entity_tax_exemp_temp text;
        ALTER TABLE award_procurement ADD partnership_or_limited_lia_temp text;
        ALTER TABLE award_procurement ADD sole_proprietorship_temp text;
        ALTER TABLE award_procurement ADD small_agricultural_coopera_temp text;
        ALTER TABLE award_procurement ADD international_organization_temp text;
        ALTER TABLE award_procurement ADD us_government_entity_temp text;
        ALTER TABLE award_procurement ADD emerging_small_business_temp text;
        ALTER TABLE award_procurement ADD c8a_program_participant_temp text;
        ALTER TABLE award_procurement ADD sba_certified_8_a_joint_ve_temp text;
        ALTER TABLE award_procurement ADD dot_certified_disadvantage_temp text;
        ALTER TABLE award_procurement ADD self_certified_small_disad_temp text;
        ALTER TABLE award_procurement ADD historically_underutilized_temp text;
        ALTER TABLE award_procurement ADD small_disadvantaged_busine_temp text;
        ALTER TABLE award_procurement ADD the_ability_one_program_temp text;
        ALTER TABLE award_procurement ADD historically_black_college_temp text;
        ALTER TABLE award_procurement ADD c1862_land_grant_college_temp text;
        ALTER TABLE award_procurement ADD c1890_land_grant_college_temp text;
        ALTER TABLE award_procurement ADD c1994_land_grant_college_temp text;
        ALTER TABLE award_procurement ADD minority_institution_temp text;
        ALTER TABLE award_procurement ADD private_university_or_coll_temp text;
        ALTER TABLE award_procurement ADD school_of_forestry_temp text;
        ALTER TABLE award_procurement ADD state_controlled_instituti_temp text;
        ALTER TABLE award_procurement ADD tribal_college_temp text;
        ALTER TABLE award_procurement ADD veterinary_college_temp text;
        ALTER TABLE award_procurement ADD educational_institution_temp text;
        ALTER TABLE award_procurement ADD alaskan_native_servicing_i_temp text;
        ALTER TABLE award_procurement ADD community_development_corp_temp text;
        ALTER TABLE award_procurement ADD native_hawaiian_servicing_temp text;
        ALTER TABLE award_procurement ADD domestic_shelter_temp text;
        ALTER TABLE award_procurement ADD manufacturer_of_goods_temp text;
        ALTER TABLE award_procurement ADD hospital_flag_temp text;
        ALTER TABLE award_procurement ADD veterinary_hospital_temp text;
        ALTER TABLE award_procurement ADD hispanic_servicing_institu_temp text;
        ALTER TABLE award_procurement ADD foundation_temp text;
        ALTER TABLE award_procurement ADD woman_owned_business_temp text;
        ALTER TABLE award_procurement ADD minority_owned_business_temp text;
        ALTER TABLE award_procurement ADD women_owned_small_business_temp text;
        ALTER TABLE award_procurement ADD economically_disadvantaged_temp text;
        ALTER TABLE award_procurement ADD joint_venture_women_owned_temp text;
        ALTER TABLE award_procurement ADD joint_venture_economically_temp text;
        ALTER TABLE award_procurement ADD veteran_owned_business_temp text;
        ALTER TABLE award_procurement ADD service_disabled_veteran_o_temp text;
        ALTER TABLE award_procurement ADD contracts_temp text;
        ALTER TABLE award_procurement ADD grants_temp text;
        ALTER TABLE award_procurement ADD receives_contracts_and_gra_temp text;
        ALTER TABLE award_procurement ADD airport_authority_temp text;
        ALTER TABLE award_procurement ADD council_of_governments_temp text;
        ALTER TABLE award_procurement ADD housing_authorities_public_temp text;
        ALTER TABLE award_procurement ADD interstate_entity_temp text;
        ALTER TABLE award_procurement ADD planning_commission_temp text;
        ALTER TABLE award_procurement ADD port_authority_temp text;
        ALTER TABLE award_procurement ADD transit_authority_temp text;
        ALTER TABLE award_procurement ADD subchapter_s_corporation_temp text;
        ALTER TABLE award_procurement ADD limited_liability_corporat_temp text;
        ALTER TABLE award_procurement ADD foreign_owned_and_located_temp text;
        ALTER TABLE award_procurement ADD american_indian_owned_busi_temp text;
        ALTER TABLE award_procurement ADD alaskan_native_owned_corpo_temp text;
        ALTER TABLE award_procurement ADD indian_tribe_federally_rec_temp text;
        ALTER TABLE award_procurement ADD native_hawaiian_owned_busi_temp text;
        ALTER TABLE award_procurement ADD tribally_owned_business_temp text;
        ALTER TABLE award_procurement ADD asian_pacific_american_own_temp text;
        ALTER TABLE award_procurement ADD black_american_owned_busin_temp text;
        ALTER TABLE award_procurement ADD hispanic_american_owned_bu_temp text;
        ALTER TABLE award_procurement ADD native_american_owned_busi_temp text;
        ALTER TABLE award_procurement ADD subcontinent_asian_asian_i_temp text;
        ALTER TABLE award_procurement ADD other_minority_owned_busin_temp text;
        ALTER TABLE award_procurement ADD for_profit_organization_temp text;
        ALTER TABLE award_procurement ADD nonprofit_organization_temp text;
        ALTER TABLE award_procurement ADD other_not_for_profit_organ_temp text;
        ALTER TABLE award_procurement ADD us_local_government_temp text;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE award_procurement
        SET
            small_business_competitive_temp = small_business_competitive,
            city_local_government_temp = city_local_government,
            county_local_government_temp = county_local_government,
            inter_municipal_local_gove_temp = inter_municipal_local_gove,
            local_government_owned_temp = local_government_owned,
            municipality_local_governm_temp = municipality_local_governm,
            school_district_local_gove_temp = school_district_local_gove,
            township_local_government_temp = township_local_government,
            us_state_government_temp = us_state_government,
            us_federal_government_temp = us_federal_government,
            federal_agency_temp = federal_agency,
            federally_funded_research_temp = federally_funded_research,
            us_tribal_government_temp = us_tribal_government,
            foreign_government_temp = foreign_government,
            community_developed_corpor_temp = community_developed_corpor,
            labor_surplus_area_firm_temp = labor_surplus_area_firm,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp,
            partnership_or_limited_lia_temp = partnership_or_limited_lia,
            sole_proprietorship_temp = sole_proprietorship,
            small_agricultural_coopera_temp = small_agricultural_coopera,
            international_organization_temp = international_organization,
            us_government_entity_temp = us_government_entity,
            emerging_small_business_temp = emerging_small_business,
            c8a_program_participant_temp = c8a_program_participant,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve,
            dot_certified_disadvantage_temp = dot_certified_disadvantage,
            self_certified_small_disad_temp = self_certified_small_disad,
            historically_underutilized_temp = historically_underutilized,
            small_disadvantaged_busine_temp = small_disadvantaged_busine,
            the_ability_one_program_temp = the_ability_one_program,
            historically_black_college_temp = historically_black_college,
            c1862_land_grant_college_temp = c1862_land_grant_college,
            c1890_land_grant_college_temp = c1890_land_grant_college,
            c1994_land_grant_college_temp = c1994_land_grant_college,
            minority_institution_temp = minority_institution,
            private_university_or_coll_temp = private_university_or_coll,
            school_of_forestry_temp = school_of_forestry,
            state_controlled_instituti_temp = state_controlled_instituti,
            tribal_college_temp = tribal_college,
            veterinary_college_temp = veterinary_college,
            educational_institution_temp = educational_institution,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i,
            community_development_corp_temp = community_development_corp,
            native_hawaiian_servicing_temp = native_hawaiian_servicing,
            domestic_shelter_temp = domestic_shelter,
            manufacturer_of_goods_temp = manufacturer_of_goods,
            hospital_flag_temp = hospital_flag,
            veterinary_hospital_temp = veterinary_hospital,
            hispanic_servicing_institu_temp = hispanic_servicing_institu,
            foundation_temp = foundation,
            woman_owned_business_temp = woman_owned_business,
            minority_owned_business_temp = minority_owned_business,
            women_owned_small_business_temp = women_owned_small_business,
            economically_disadvantaged_temp = economically_disadvantaged,
            joint_venture_women_owned_temp = joint_venture_women_owned,
            joint_venture_economically_temp = joint_venture_economically,
            veteran_owned_business_temp = veteran_owned_business,
            service_disabled_veteran_o_temp = service_disabled_veteran_o,
            contracts_temp = contracts,
            grants_temp = grants,
            receives_contracts_and_gra_temp = receives_contracts_and_gra,
            airport_authority_temp = airport_authority,
            council_of_governments_temp = council_of_governments,
            housing_authorities_public_temp = housing_authorities_public,
            interstate_entity_temp = interstate_entity,
            planning_commission_temp = planning_commission,
            port_authority_temp = port_authority,
            transit_authority_temp = transit_authority,
            subchapter_s_corporation_temp = subchapter_s_corporation,
            limited_liability_corporat_temp = limited_liability_corporat,
            foreign_owned_and_located_temp = foreign_owned_and_located,
            american_indian_owned_busi_temp = american_indian_owned_busi,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi,
            tribally_owned_business_temp = tribally_owned_business,
            asian_pacific_american_own_temp = asian_pacific_american_own,
            black_american_owned_busin_temp = black_american_owned_busin,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu,
            native_american_owned_busi_temp = native_american_owned_busi,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i,
            other_minority_owned_busin_temp = other_minority_owned_busin,
            for_profit_organization_temp = for_profit_organization,
            nonprofit_organization_temp = nonprofit_organization,
            other_not_for_profit_organ_temp = other_not_for_profit_organ,
            us_local_government_temp = us_local_government
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE award_procurement DROP COLUMN city_local_government;
        ALTER TABLE award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE award_procurement DROP COLUMN county_local_government;
        ALTER TABLE award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE award_procurement DROP COLUMN township_local_government;
        ALTER TABLE award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE award_procurement DROP COLUMN us_state_government;
        ALTER TABLE award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE award_procurement DROP COLUMN federal_agency;
        ALTER TABLE award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE award_procurement DROP COLUMN foreign_government;
        ALTER TABLE award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE award_procurement DROP COLUMN international_organization;
        ALTER TABLE award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE award_procurement DROP COLUMN minority_institution;
        ALTER TABLE award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE award_procurement DROP COLUMN tribal_college;
        ALTER TABLE award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE award_procurement DROP COLUMN educational_institution;
        ALTER TABLE award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE award_procurement DROP COLUMN foundation;
        ALTER TABLE award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE award_procurement DROP COLUMN contracts;
        ALTER TABLE award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE award_procurement DROP COLUMN grants;
        ALTER TABLE award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE award_procurement DROP COLUMN airport_authority;
        ALTER TABLE award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE award_procurement DROP COLUMN planning_commission;
        ALTER TABLE award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE award_procurement DROP COLUMN port_authority;
        ALTER TABLE award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE award_procurement DROP COLUMN transit_authority;
        ALTER TABLE award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE award_procurement DROP COLUMN us_local_government;
        ALTER TABLE award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)

    # Detached Award Procurement
    # Add temp text
    op.execute("""
        ALTER TABLE detached_award_procurement ADD small_business_competitive_temp text;
        ALTER TABLE detached_award_procurement ADD city_local_government_temp text;
        ALTER TABLE detached_award_procurement ADD county_local_government_temp text;
        ALTER TABLE detached_award_procurement ADD inter_municipal_local_gove_temp text;
        ALTER TABLE detached_award_procurement ADD local_government_owned_temp text;
        ALTER TABLE detached_award_procurement ADD municipality_local_governm_temp text;
        ALTER TABLE detached_award_procurement ADD school_district_local_gove_temp text;
        ALTER TABLE detached_award_procurement ADD township_local_government_temp text;
        ALTER TABLE detached_award_procurement ADD us_state_government_temp text;
        ALTER TABLE detached_award_procurement ADD us_federal_government_temp text;
        ALTER TABLE detached_award_procurement ADD federal_agency_temp text;
        ALTER TABLE detached_award_procurement ADD federally_funded_research_temp text;
        ALTER TABLE detached_award_procurement ADD us_tribal_government_temp text;
        ALTER TABLE detached_award_procurement ADD foreign_government_temp text;
        ALTER TABLE detached_award_procurement ADD community_developed_corpor_temp text;
        ALTER TABLE detached_award_procurement ADD labor_surplus_area_firm_temp text;
        ALTER TABLE detached_award_procurement ADD corporate_entity_not_tax_e_temp text;
        ALTER TABLE detached_award_procurement ADD corporate_entity_tax_exemp_temp text;
        ALTER TABLE detached_award_procurement ADD partnership_or_limited_lia_temp text;
        ALTER TABLE detached_award_procurement ADD sole_proprietorship_temp text;
        ALTER TABLE detached_award_procurement ADD small_agricultural_coopera_temp text;
        ALTER TABLE detached_award_procurement ADD international_organization_temp text;
        ALTER TABLE detached_award_procurement ADD us_government_entity_temp text;
        ALTER TABLE detached_award_procurement ADD emerging_small_business_temp text;
        ALTER TABLE detached_award_procurement ADD c8a_program_participant_temp text;
        ALTER TABLE detached_award_procurement ADD sba_certified_8_a_joint_ve_temp text;
        ALTER TABLE detached_award_procurement ADD dot_certified_disadvantage_temp text;
        ALTER TABLE detached_award_procurement ADD self_certified_small_disad_temp text;
        ALTER TABLE detached_award_procurement ADD historically_underutilized_temp text;
        ALTER TABLE detached_award_procurement ADD small_disadvantaged_busine_temp text;
        ALTER TABLE detached_award_procurement ADD the_ability_one_program_temp text;
        ALTER TABLE detached_award_procurement ADD historically_black_college_temp text;
        ALTER TABLE detached_award_procurement ADD c1862_land_grant_college_temp text;
        ALTER TABLE detached_award_procurement ADD c1890_land_grant_college_temp text;
        ALTER TABLE detached_award_procurement ADD c1994_land_grant_college_temp text;
        ALTER TABLE detached_award_procurement ADD minority_institution_temp text;
        ALTER TABLE detached_award_procurement ADD private_university_or_coll_temp text;
        ALTER TABLE detached_award_procurement ADD school_of_forestry_temp text;
        ALTER TABLE detached_award_procurement ADD state_controlled_instituti_temp text;
        ALTER TABLE detached_award_procurement ADD tribal_college_temp text;
        ALTER TABLE detached_award_procurement ADD veterinary_college_temp text;
        ALTER TABLE detached_award_procurement ADD educational_institution_temp text;
        ALTER TABLE detached_award_procurement ADD alaskan_native_servicing_i_temp text;
        ALTER TABLE detached_award_procurement ADD community_development_corp_temp text;
        ALTER TABLE detached_award_procurement ADD native_hawaiian_servicing_temp text;
        ALTER TABLE detached_award_procurement ADD domestic_shelter_temp text;
        ALTER TABLE detached_award_procurement ADD manufacturer_of_goods_temp text;
        ALTER TABLE detached_award_procurement ADD hospital_flag_temp text;
        ALTER TABLE detached_award_procurement ADD veterinary_hospital_temp text;
        ALTER TABLE detached_award_procurement ADD hispanic_servicing_institu_temp text;
        ALTER TABLE detached_award_procurement ADD foundation_temp text;
        ALTER TABLE detached_award_procurement ADD woman_owned_business_temp text;
        ALTER TABLE detached_award_procurement ADD minority_owned_business_temp text;
        ALTER TABLE detached_award_procurement ADD women_owned_small_business_temp text;
        ALTER TABLE detached_award_procurement ADD economically_disadvantaged_temp text;
        ALTER TABLE detached_award_procurement ADD joint_venture_women_owned_temp text;
        ALTER TABLE detached_award_procurement ADD joint_venture_economically_temp text;
        ALTER TABLE detached_award_procurement ADD veteran_owned_business_temp text;
        ALTER TABLE detached_award_procurement ADD service_disabled_veteran_o_temp text;
        ALTER TABLE detached_award_procurement ADD contracts_temp text;
        ALTER TABLE detached_award_procurement ADD grants_temp text;
        ALTER TABLE detached_award_procurement ADD receives_contracts_and_gra_temp text;
        ALTER TABLE detached_award_procurement ADD airport_authority_temp text;
        ALTER TABLE detached_award_procurement ADD council_of_governments_temp text;
        ALTER TABLE detached_award_procurement ADD housing_authorities_public_temp text;
        ALTER TABLE detached_award_procurement ADD interstate_entity_temp text;
        ALTER TABLE detached_award_procurement ADD planning_commission_temp text;
        ALTER TABLE detached_award_procurement ADD port_authority_temp text;
        ALTER TABLE detached_award_procurement ADD transit_authority_temp text;
        ALTER TABLE detached_award_procurement ADD subchapter_s_corporation_temp text;
        ALTER TABLE detached_award_procurement ADD limited_liability_corporat_temp text;
        ALTER TABLE detached_award_procurement ADD foreign_owned_and_located_temp text;
        ALTER TABLE detached_award_procurement ADD american_indian_owned_busi_temp text;
        ALTER TABLE detached_award_procurement ADD alaskan_native_owned_corpo_temp text;
        ALTER TABLE detached_award_procurement ADD indian_tribe_federally_rec_temp text;
        ALTER TABLE detached_award_procurement ADD native_hawaiian_owned_busi_temp text;
        ALTER TABLE detached_award_procurement ADD tribally_owned_business_temp text;
        ALTER TABLE detached_award_procurement ADD asian_pacific_american_own_temp text;
        ALTER TABLE detached_award_procurement ADD black_american_owned_busin_temp text;
        ALTER TABLE detached_award_procurement ADD hispanic_american_owned_bu_temp text;
        ALTER TABLE detached_award_procurement ADD native_american_owned_busi_temp text;
        ALTER TABLE detached_award_procurement ADD subcontinent_asian_asian_i_temp text;
        ALTER TABLE detached_award_procurement ADD other_minority_owned_busin_temp text;
        ALTER TABLE detached_award_procurement ADD for_profit_organization_temp text;
        ALTER TABLE detached_award_procurement ADD nonprofit_organization_temp text;
        ALTER TABLE detached_award_procurement ADD other_not_for_profit_organ_temp text;
        ALTER TABLE detached_award_procurement ADD us_local_government_temp text;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE detached_award_procurement
        SET
            small_business_competitive_temp = small_business_competitive,
            city_local_government_temp = city_local_government,
            county_local_government_temp = county_local_government,
            inter_municipal_local_gove_temp = inter_municipal_local_gove,
            local_government_owned_temp = local_government_owned,
            municipality_local_governm_temp = municipality_local_governm,
            school_district_local_gove_temp = school_district_local_gove,
            township_local_government_temp = township_local_government,
            us_state_government_temp = us_state_government,
            us_federal_government_temp = us_federal_government,
            federal_agency_temp = federal_agency,
            federally_funded_research_temp = federally_funded_research,
            us_tribal_government_temp = us_tribal_government,
            foreign_government_temp = foreign_government,
            community_developed_corpor_temp = community_developed_corpor,
            labor_surplus_area_firm_temp = labor_surplus_area_firm,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp,
            partnership_or_limited_lia_temp = partnership_or_limited_lia,
            sole_proprietorship_temp = sole_proprietorship,
            small_agricultural_coopera_temp = small_agricultural_coopera,
            international_organization_temp = international_organization,
            us_government_entity_temp = us_government_entity,
            emerging_small_business_temp = emerging_small_business,
            c8a_program_participant_temp = c8a_program_participant,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve,
            dot_certified_disadvantage_temp = dot_certified_disadvantage,
            self_certified_small_disad_temp = self_certified_small_disad,
            historically_underutilized_temp = historically_underutilized,
            small_disadvantaged_busine_temp = small_disadvantaged_busine,
            the_ability_one_program_temp = the_ability_one_program,
            historically_black_college_temp = historically_black_college,
            c1862_land_grant_college_temp = c1862_land_grant_college,
            c1890_land_grant_college_temp = c1890_land_grant_college,
            c1994_land_grant_college_temp = c1994_land_grant_college,
            minority_institution_temp = minority_institution,
            private_university_or_coll_temp = private_university_or_coll,
            school_of_forestry_temp = school_of_forestry,
            state_controlled_instituti_temp = state_controlled_instituti,
            tribal_college_temp = tribal_college,
            veterinary_college_temp = veterinary_college,
            educational_institution_temp = educational_institution,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i,
            community_development_corp_temp = community_development_corp,
            native_hawaiian_servicing_temp = native_hawaiian_servicing,
            domestic_shelter_temp = domestic_shelter,
            manufacturer_of_goods_temp = manufacturer_of_goods,
            hospital_flag_temp = hospital_flag,
            veterinary_hospital_temp = veterinary_hospital,
            hispanic_servicing_institu_temp = hispanic_servicing_institu,
            foundation_temp = foundation,
            woman_owned_business_temp = woman_owned_business,
            minority_owned_business_temp = minority_owned_business,
            women_owned_small_business_temp = women_owned_small_business,
            economically_disadvantaged_temp = economically_disadvantaged,
            joint_venture_women_owned_temp = joint_venture_women_owned,
            joint_venture_economically_temp = joint_venture_economically,
            veteran_owned_business_temp = veteran_owned_business,
            service_disabled_veteran_o_temp = service_disabled_veteran_o,
            contracts_temp = contracts,
            grants_temp = grants,
            receives_contracts_and_gra_temp = receives_contracts_and_gra,
            airport_authority_temp = airport_authority,
            council_of_governments_temp = council_of_governments,
            housing_authorities_public_temp = housing_authorities_public,
            interstate_entity_temp = interstate_entity,
            planning_commission_temp = planning_commission,
            port_authority_temp = port_authority,
            transit_authority_temp = transit_authority,
            subchapter_s_corporation_temp = subchapter_s_corporation,
            limited_liability_corporat_temp = limited_liability_corporat,
            foreign_owned_and_located_temp = foreign_owned_and_located,
            american_indian_owned_busi_temp = american_indian_owned_busi,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi,
            tribally_owned_business_temp = tribally_owned_business,
            asian_pacific_american_own_temp = asian_pacific_american_own,
            black_american_owned_busin_temp = black_american_owned_busin,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu,
            native_american_owned_busi_temp = native_american_owned_busi,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i,
            other_minority_owned_busin_temp = other_minority_owned_busin,
            for_profit_organization_temp = for_profit_organization,
            nonprofit_organization_temp = nonprofit_organization,
            other_not_for_profit_organ_temp = other_not_for_profit_organ,
            us_local_government_temp = us_local_government
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE detached_award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE detached_award_procurement DROP COLUMN city_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN county_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE detached_award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE detached_award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE detached_award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE detached_award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE detached_award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE detached_award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE detached_award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE detached_award_procurement DROP COLUMN township_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE detached_award_procurement DROP COLUMN us_state_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE detached_award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE detached_award_procurement DROP COLUMN federal_agency;
        ALTER TABLE detached_award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE detached_award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE detached_award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE detached_award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE detached_award_procurement DROP COLUMN foreign_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE detached_award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE detached_award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE detached_award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE detached_award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE detached_award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE detached_award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE detached_award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE detached_award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE detached_award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE detached_award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE detached_award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE detached_award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE detached_award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE detached_award_procurement DROP COLUMN international_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE detached_award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE detached_award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE detached_award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE detached_award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE detached_award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE detached_award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE detached_award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE detached_award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE detached_award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE detached_award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE detached_award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE detached_award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE detached_award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE detached_award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE detached_award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE detached_award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE detached_award_procurement DROP COLUMN minority_institution;
        ALTER TABLE detached_award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE detached_award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE detached_award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE detached_award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE detached_award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE detached_award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE detached_award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE detached_award_procurement DROP COLUMN tribal_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE detached_award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE detached_award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE detached_award_procurement DROP COLUMN educational_institution;
        ALTER TABLE detached_award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE detached_award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE detached_award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE detached_award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE detached_award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE detached_award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE detached_award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE detached_award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE detached_award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE detached_award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE detached_award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE detached_award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE detached_award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE detached_award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE detached_award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE detached_award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE detached_award_procurement DROP COLUMN foundation;
        ALTER TABLE detached_award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE detached_award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE detached_award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE detached_award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE detached_award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE detached_award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE detached_award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE detached_award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE detached_award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE detached_award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE detached_award_procurement DROP COLUMN contracts;
        ALTER TABLE detached_award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE detached_award_procurement DROP COLUMN grants;
        ALTER TABLE detached_award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE detached_award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE detached_award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE detached_award_procurement DROP COLUMN airport_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE detached_award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE detached_award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE detached_award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE detached_award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE detached_award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE detached_award_procurement DROP COLUMN planning_commission;
        ALTER TABLE detached_award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE detached_award_procurement DROP COLUMN port_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN transit_authority;
        ALTER TABLE detached_award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE detached_award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE detached_award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE detached_award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE detached_award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE detached_award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE detached_award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE detached_award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE detached_award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE detached_award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE detached_award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE detached_award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE detached_award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE detached_award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE detached_award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE detached_award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE detached_award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE detached_award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE detached_award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE detached_award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE detached_award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE detached_award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE detached_award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE detached_award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE detached_award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE detached_award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE detached_award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE detached_award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE detached_award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE detached_award_procurement DROP COLUMN us_local_government;
        ALTER TABLE detached_award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)

    # Certified Award Procurement
    # Add temp text
    op.execute("""
        ALTER TABLE certified_award_procurement ADD small_business_competitive_temp text;
        ALTER TABLE certified_award_procurement ADD city_local_government_temp text;
        ALTER TABLE certified_award_procurement ADD county_local_government_temp text;
        ALTER TABLE certified_award_procurement ADD inter_municipal_local_gove_temp text;
        ALTER TABLE certified_award_procurement ADD local_government_owned_temp text;
        ALTER TABLE certified_award_procurement ADD municipality_local_governm_temp text;
        ALTER TABLE certified_award_procurement ADD school_district_local_gove_temp text;
        ALTER TABLE certified_award_procurement ADD township_local_government_temp text;
        ALTER TABLE certified_award_procurement ADD us_state_government_temp text;
        ALTER TABLE certified_award_procurement ADD us_federal_government_temp text;
        ALTER TABLE certified_award_procurement ADD federal_agency_temp text;
        ALTER TABLE certified_award_procurement ADD federally_funded_research_temp text;
        ALTER TABLE certified_award_procurement ADD us_tribal_government_temp text;
        ALTER TABLE certified_award_procurement ADD foreign_government_temp text;
        ALTER TABLE certified_award_procurement ADD community_developed_corpor_temp text;
        ALTER TABLE certified_award_procurement ADD labor_surplus_area_firm_temp text;
        ALTER TABLE certified_award_procurement ADD corporate_entity_not_tax_e_temp text;
        ALTER TABLE certified_award_procurement ADD corporate_entity_tax_exemp_temp text;
        ALTER TABLE certified_award_procurement ADD partnership_or_limited_lia_temp text;
        ALTER TABLE certified_award_procurement ADD sole_proprietorship_temp text;
        ALTER TABLE certified_award_procurement ADD small_agricultural_coopera_temp text;
        ALTER TABLE certified_award_procurement ADD international_organization_temp text;
        ALTER TABLE certified_award_procurement ADD us_government_entity_temp text;
        ALTER TABLE certified_award_procurement ADD emerging_small_business_temp text;
        ALTER TABLE certified_award_procurement ADD c8a_program_participant_temp text;
        ALTER TABLE certified_award_procurement ADD sba_certified_8_a_joint_ve_temp text;
        ALTER TABLE certified_award_procurement ADD dot_certified_disadvantage_temp text;
        ALTER TABLE certified_award_procurement ADD self_certified_small_disad_temp text;
        ALTER TABLE certified_award_procurement ADD historically_underutilized_temp text;
        ALTER TABLE certified_award_procurement ADD small_disadvantaged_busine_temp text;
        ALTER TABLE certified_award_procurement ADD the_ability_one_program_temp text;
        ALTER TABLE certified_award_procurement ADD historically_black_college_temp text;
        ALTER TABLE certified_award_procurement ADD c1862_land_grant_college_temp text;
        ALTER TABLE certified_award_procurement ADD c1890_land_grant_college_temp text;
        ALTER TABLE certified_award_procurement ADD c1994_land_grant_college_temp text;
        ALTER TABLE certified_award_procurement ADD minority_institution_temp text;
        ALTER TABLE certified_award_procurement ADD private_university_or_coll_temp text;
        ALTER TABLE certified_award_procurement ADD school_of_forestry_temp text;
        ALTER TABLE certified_award_procurement ADD state_controlled_instituti_temp text;
        ALTER TABLE certified_award_procurement ADD tribal_college_temp text;
        ALTER TABLE certified_award_procurement ADD veterinary_college_temp text;
        ALTER TABLE certified_award_procurement ADD educational_institution_temp text;
        ALTER TABLE certified_award_procurement ADD alaskan_native_servicing_i_temp text;
        ALTER TABLE certified_award_procurement ADD community_development_corp_temp text;
        ALTER TABLE certified_award_procurement ADD native_hawaiian_servicing_temp text;
        ALTER TABLE certified_award_procurement ADD domestic_shelter_temp text;
        ALTER TABLE certified_award_procurement ADD manufacturer_of_goods_temp text;
        ALTER TABLE certified_award_procurement ADD hospital_flag_temp text;
        ALTER TABLE certified_award_procurement ADD veterinary_hospital_temp text;
        ALTER TABLE certified_award_procurement ADD hispanic_servicing_institu_temp text;
        ALTER TABLE certified_award_procurement ADD foundation_temp text;
        ALTER TABLE certified_award_procurement ADD woman_owned_business_temp text;
        ALTER TABLE certified_award_procurement ADD minority_owned_business_temp text;
        ALTER TABLE certified_award_procurement ADD women_owned_small_business_temp text;
        ALTER TABLE certified_award_procurement ADD economically_disadvantaged_temp text;
        ALTER TABLE certified_award_procurement ADD joint_venture_women_owned_temp text;
        ALTER TABLE certified_award_procurement ADD joint_venture_economically_temp text;
        ALTER TABLE certified_award_procurement ADD veteran_owned_business_temp text;
        ALTER TABLE certified_award_procurement ADD service_disabled_veteran_o_temp text;
        ALTER TABLE certified_award_procurement ADD contracts_temp text;
        ALTER TABLE certified_award_procurement ADD grants_temp text;
        ALTER TABLE certified_award_procurement ADD receives_contracts_and_gra_temp text;
        ALTER TABLE certified_award_procurement ADD airport_authority_temp text;
        ALTER TABLE certified_award_procurement ADD council_of_governments_temp text;
        ALTER TABLE certified_award_procurement ADD housing_authorities_public_temp text;
        ALTER TABLE certified_award_procurement ADD interstate_entity_temp text;
        ALTER TABLE certified_award_procurement ADD planning_commission_temp text;
        ALTER TABLE certified_award_procurement ADD port_authority_temp text;
        ALTER TABLE certified_award_procurement ADD transit_authority_temp text;
        ALTER TABLE certified_award_procurement ADD subchapter_s_corporation_temp text;
        ALTER TABLE certified_award_procurement ADD limited_liability_corporat_temp text;
        ALTER TABLE certified_award_procurement ADD foreign_owned_and_located_temp text;
        ALTER TABLE certified_award_procurement ADD american_indian_owned_busi_temp text;
        ALTER TABLE certified_award_procurement ADD alaskan_native_owned_corpo_temp text;
        ALTER TABLE certified_award_procurement ADD indian_tribe_federally_rec_temp text;
        ALTER TABLE certified_award_procurement ADD native_hawaiian_owned_busi_temp text;
        ALTER TABLE certified_award_procurement ADD tribally_owned_business_temp text;
        ALTER TABLE certified_award_procurement ADD asian_pacific_american_own_temp text;
        ALTER TABLE certified_award_procurement ADD black_american_owned_busin_temp text;
        ALTER TABLE certified_award_procurement ADD hispanic_american_owned_bu_temp text;
        ALTER TABLE certified_award_procurement ADD native_american_owned_busi_temp text;
        ALTER TABLE certified_award_procurement ADD subcontinent_asian_asian_i_temp text;
        ALTER TABLE certified_award_procurement ADD other_minority_owned_busin_temp text;
        ALTER TABLE certified_award_procurement ADD for_profit_organization_temp text;
        ALTER TABLE certified_award_procurement ADD nonprofit_organization_temp text;
        ALTER TABLE certified_award_procurement ADD other_not_for_profit_organ_temp text;
        ALTER TABLE certified_award_procurement ADD us_local_government_temp text;
    """)
    # Setting the values of the temporary columns
    op.execute("""
        UPDATE certified_award_procurement
        SET
            small_business_competitive_temp = small_business_competitive,
            city_local_government_temp = city_local_government,
            county_local_government_temp = county_local_government,
            inter_municipal_local_gove_temp = inter_municipal_local_gove,
            local_government_owned_temp = local_government_owned,
            municipality_local_governm_temp = municipality_local_governm,
            school_district_local_gove_temp = school_district_local_gove,
            township_local_government_temp = township_local_government,
            us_state_government_temp = us_state_government,
            us_federal_government_temp = us_federal_government,
            federal_agency_temp = federal_agency,
            federally_funded_research_temp = federally_funded_research,
            us_tribal_government_temp = us_tribal_government,
            foreign_government_temp = foreign_government,
            community_developed_corpor_temp = community_developed_corpor,
            labor_surplus_area_firm_temp = labor_surplus_area_firm,
            corporate_entity_not_tax_e_temp = corporate_entity_not_tax_e,
            corporate_entity_tax_exemp_temp = corporate_entity_tax_exemp,
            partnership_or_limited_lia_temp = partnership_or_limited_lia,
            sole_proprietorship_temp = sole_proprietorship,
            small_agricultural_coopera_temp = small_agricultural_coopera,
            international_organization_temp = international_organization,
            us_government_entity_temp = us_government_entity,
            emerging_small_business_temp = emerging_small_business,
            c8a_program_participant_temp = c8a_program_participant,
            sba_certified_8_a_joint_ve_temp = sba_certified_8_a_joint_ve,
            dot_certified_disadvantage_temp = dot_certified_disadvantage,
            self_certified_small_disad_temp = self_certified_small_disad,
            historically_underutilized_temp = historically_underutilized,
            small_disadvantaged_busine_temp = small_disadvantaged_busine,
            the_ability_one_program_temp = the_ability_one_program,
            historically_black_college_temp = historically_black_college,
            c1862_land_grant_college_temp = c1862_land_grant_college,
            c1890_land_grant_college_temp = c1890_land_grant_college,
            c1994_land_grant_college_temp = c1994_land_grant_college,
            minority_institution_temp = minority_institution,
            private_university_or_coll_temp = private_university_or_coll,
            school_of_forestry_temp = school_of_forestry,
            state_controlled_instituti_temp = state_controlled_instituti,
            tribal_college_temp = tribal_college,
            veterinary_college_temp = veterinary_college,
            educational_institution_temp = educational_institution,
            alaskan_native_servicing_i_temp = alaskan_native_servicing_i,
            community_development_corp_temp = community_development_corp,
            native_hawaiian_servicing_temp = native_hawaiian_servicing,
            domestic_shelter_temp = domestic_shelter,
            manufacturer_of_goods_temp = manufacturer_of_goods,
            hospital_flag_temp = hospital_flag,
            veterinary_hospital_temp = veterinary_hospital,
            hispanic_servicing_institu_temp = hispanic_servicing_institu,
            foundation_temp = foundation,
            woman_owned_business_temp = woman_owned_business,
            minority_owned_business_temp = minority_owned_business,
            women_owned_small_business_temp = women_owned_small_business,
            economically_disadvantaged_temp = economically_disadvantaged,
            joint_venture_women_owned_temp = joint_venture_women_owned,
            joint_venture_economically_temp = joint_venture_economically,
            veteran_owned_business_temp = veteran_owned_business,
            service_disabled_veteran_o_temp = service_disabled_veteran_o,
            contracts_temp = contracts,
            grants_temp = grants,
            receives_contracts_and_gra_temp = receives_contracts_and_gra,
            airport_authority_temp = airport_authority,
            council_of_governments_temp = council_of_governments,
            housing_authorities_public_temp = housing_authorities_public,
            interstate_entity_temp = interstate_entity,
            planning_commission_temp = planning_commission,
            port_authority_temp = port_authority,
            transit_authority_temp = transit_authority,
            subchapter_s_corporation_temp = subchapter_s_corporation,
            limited_liability_corporat_temp = limited_liability_corporat,
            foreign_owned_and_located_temp = foreign_owned_and_located,
            american_indian_owned_busi_temp = american_indian_owned_busi,
            alaskan_native_owned_corpo_temp = alaskan_native_owned_corpo,
            indian_tribe_federally_rec_temp = indian_tribe_federally_rec,
            native_hawaiian_owned_busi_temp = native_hawaiian_owned_busi,
            tribally_owned_business_temp = tribally_owned_business,
            asian_pacific_american_own_temp = asian_pacific_american_own,
            black_american_owned_busin_temp = black_american_owned_busin,
            hispanic_american_owned_bu_temp = hispanic_american_owned_bu,
            native_american_owned_busi_temp = native_american_owned_busi,
            subcontinent_asian_asian_i_temp = subcontinent_asian_asian_i,
            other_minority_owned_busin_temp = other_minority_owned_busin,
            for_profit_organization_temp = for_profit_organization,
            nonprofit_organization_temp = nonprofit_organization,
            other_not_for_profit_organ_temp = other_not_for_profit_organ,
            us_local_government_temp = us_local_government
    """)
    # Deleting the old columns and renaming the temporary columns to match the new ones
    op.execute("""
        ALTER TABLE certified_award_procurement DROP COLUMN small_business_competitive;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_business_competitive_temp TO small_business_competitive;
        ALTER TABLE certified_award_procurement DROP COLUMN city_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN city_local_government_temp TO city_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN county_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN county_local_government_temp TO county_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN inter_municipal_local_gove;
        ALTER TABLE certified_award_procurement RENAME COLUMN inter_municipal_local_gove_temp TO inter_municipal_local_gove;
        ALTER TABLE certified_award_procurement DROP COLUMN local_government_owned;
        ALTER TABLE certified_award_procurement RENAME COLUMN local_government_owned_temp TO local_government_owned;
        ALTER TABLE certified_award_procurement DROP COLUMN municipality_local_governm;
        ALTER TABLE certified_award_procurement RENAME COLUMN municipality_local_governm_temp TO municipality_local_governm;
        ALTER TABLE certified_award_procurement DROP COLUMN school_district_local_gove;
        ALTER TABLE certified_award_procurement RENAME COLUMN school_district_local_gove_temp TO school_district_local_gove;
        ALTER TABLE certified_award_procurement DROP COLUMN township_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN township_local_government_temp TO township_local_government;
        ALTER TABLE certified_award_procurement DROP COLUMN us_state_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_state_government_temp TO us_state_government;
        ALTER TABLE certified_award_procurement DROP COLUMN us_federal_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_federal_government_temp TO us_federal_government;
        ALTER TABLE certified_award_procurement DROP COLUMN federal_agency;
        ALTER TABLE certified_award_procurement RENAME COLUMN federal_agency_temp TO federal_agency;
        ALTER TABLE certified_award_procurement DROP COLUMN federally_funded_research;
        ALTER TABLE certified_award_procurement RENAME COLUMN federally_funded_research_temp TO federally_funded_research;
        ALTER TABLE certified_award_procurement DROP COLUMN us_tribal_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_tribal_government_temp TO us_tribal_government;
        ALTER TABLE certified_award_procurement DROP COLUMN foreign_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN foreign_government_temp TO foreign_government;
        ALTER TABLE certified_award_procurement DROP COLUMN community_developed_corpor;
        ALTER TABLE certified_award_procurement RENAME COLUMN community_developed_corpor_temp TO community_developed_corpor;
        ALTER TABLE certified_award_procurement DROP COLUMN labor_surplus_area_firm;
        ALTER TABLE certified_award_procurement RENAME COLUMN labor_surplus_area_firm_temp TO labor_surplus_area_firm;
        ALTER TABLE certified_award_procurement DROP COLUMN corporate_entity_not_tax_e;
        ALTER TABLE certified_award_procurement RENAME COLUMN corporate_entity_not_tax_e_temp TO corporate_entity_not_tax_e;
        ALTER TABLE certified_award_procurement DROP COLUMN corporate_entity_tax_exemp;
        ALTER TABLE certified_award_procurement RENAME COLUMN corporate_entity_tax_exemp_temp TO corporate_entity_tax_exemp;
        ALTER TABLE certified_award_procurement DROP COLUMN partnership_or_limited_lia;
        ALTER TABLE certified_award_procurement RENAME COLUMN partnership_or_limited_lia_temp TO partnership_or_limited_lia;
        ALTER TABLE certified_award_procurement DROP COLUMN sole_proprietorship;
        ALTER TABLE certified_award_procurement RENAME COLUMN sole_proprietorship_temp TO sole_proprietorship;
        ALTER TABLE certified_award_procurement DROP COLUMN small_agricultural_coopera;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_agricultural_coopera_temp TO small_agricultural_coopera;
        ALTER TABLE certified_award_procurement DROP COLUMN international_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN international_organization_temp TO international_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN us_government_entity;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_government_entity_temp TO us_government_entity;
        ALTER TABLE certified_award_procurement DROP COLUMN emerging_small_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN emerging_small_business_temp TO emerging_small_business;
        ALTER TABLE certified_award_procurement DROP COLUMN c8a_program_participant;
        ALTER TABLE certified_award_procurement RENAME COLUMN c8a_program_participant_temp TO c8a_program_participant;
        ALTER TABLE certified_award_procurement DROP COLUMN sba_certified_8_a_joint_ve;
        ALTER TABLE certified_award_procurement RENAME COLUMN sba_certified_8_a_joint_ve_temp TO sba_certified_8_a_joint_ve;
        ALTER TABLE certified_award_procurement DROP COLUMN dot_certified_disadvantage;
        ALTER TABLE certified_award_procurement RENAME COLUMN dot_certified_disadvantage_temp TO dot_certified_disadvantage;
        ALTER TABLE certified_award_procurement DROP COLUMN self_certified_small_disad;
        ALTER TABLE certified_award_procurement RENAME COLUMN self_certified_small_disad_temp TO self_certified_small_disad;
        ALTER TABLE certified_award_procurement DROP COLUMN historically_underutilized;
        ALTER TABLE certified_award_procurement RENAME COLUMN historically_underutilized_temp TO historically_underutilized;
        ALTER TABLE certified_award_procurement DROP COLUMN small_disadvantaged_busine;
        ALTER TABLE certified_award_procurement RENAME COLUMN small_disadvantaged_busine_temp TO small_disadvantaged_busine;
        ALTER TABLE certified_award_procurement DROP COLUMN the_ability_one_program;
        ALTER TABLE certified_award_procurement RENAME COLUMN the_ability_one_program_temp TO the_ability_one_program;
        ALTER TABLE certified_award_procurement DROP COLUMN historically_black_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN historically_black_college_temp TO historically_black_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1862_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1862_land_grant_college_temp TO c1862_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1890_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1890_land_grant_college_temp TO c1890_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN c1994_land_grant_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN c1994_land_grant_college_temp TO c1994_land_grant_college;
        ALTER TABLE certified_award_procurement DROP COLUMN minority_institution;
        ALTER TABLE certified_award_procurement RENAME COLUMN minority_institution_temp TO minority_institution;
        ALTER TABLE certified_award_procurement DROP COLUMN private_university_or_coll;
        ALTER TABLE certified_award_procurement RENAME COLUMN private_university_or_coll_temp TO private_university_or_coll;
        ALTER TABLE certified_award_procurement DROP COLUMN school_of_forestry;
        ALTER TABLE certified_award_procurement RENAME COLUMN school_of_forestry_temp TO school_of_forestry;
        ALTER TABLE certified_award_procurement DROP COLUMN state_controlled_instituti;
        ALTER TABLE certified_award_procurement RENAME COLUMN state_controlled_instituti_temp TO state_controlled_instituti;
        ALTER TABLE certified_award_procurement DROP COLUMN tribal_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN tribal_college_temp TO tribal_college;
        ALTER TABLE certified_award_procurement DROP COLUMN veterinary_college;
        ALTER TABLE certified_award_procurement RENAME COLUMN veterinary_college_temp TO veterinary_college;
        ALTER TABLE certified_award_procurement DROP COLUMN educational_institution;
        ALTER TABLE certified_award_procurement RENAME COLUMN educational_institution_temp TO educational_institution;
        ALTER TABLE certified_award_procurement DROP COLUMN alaskan_native_servicing_i;
        ALTER TABLE certified_award_procurement RENAME COLUMN alaskan_native_servicing_i_temp TO alaskan_native_servicing_i;
        ALTER TABLE certified_award_procurement DROP COLUMN community_development_corp;
        ALTER TABLE certified_award_procurement RENAME COLUMN community_development_corp_temp TO community_development_corp;
        ALTER TABLE certified_award_procurement DROP COLUMN native_hawaiian_servicing;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_hawaiian_servicing_temp TO native_hawaiian_servicing;
        ALTER TABLE certified_award_procurement DROP COLUMN domestic_shelter;
        ALTER TABLE certified_award_procurement RENAME COLUMN domestic_shelter_temp TO domestic_shelter;
        ALTER TABLE certified_award_procurement DROP COLUMN manufacturer_of_goods;
        ALTER TABLE certified_award_procurement RENAME COLUMN manufacturer_of_goods_temp TO manufacturer_of_goods;
        ALTER TABLE certified_award_procurement DROP COLUMN hospital_flag;
        ALTER TABLE certified_award_procurement RENAME COLUMN hospital_flag_temp TO hospital_flag;
        ALTER TABLE certified_award_procurement DROP COLUMN veterinary_hospital;
        ALTER TABLE certified_award_procurement RENAME COLUMN veterinary_hospital_temp TO veterinary_hospital;
        ALTER TABLE certified_award_procurement DROP COLUMN hispanic_servicing_institu;
        ALTER TABLE certified_award_procurement RENAME COLUMN hispanic_servicing_institu_temp TO hispanic_servicing_institu;
        ALTER TABLE certified_award_procurement DROP COLUMN foundation;
        ALTER TABLE certified_award_procurement RENAME COLUMN foundation_temp TO foundation;
        ALTER TABLE certified_award_procurement DROP COLUMN woman_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN woman_owned_business_temp TO woman_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN minority_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN minority_owned_business_temp TO minority_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN women_owned_small_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN women_owned_small_business_temp TO women_owned_small_business;
        ALTER TABLE certified_award_procurement DROP COLUMN economically_disadvantaged;
        ALTER TABLE certified_award_procurement RENAME COLUMN economically_disadvantaged_temp TO economically_disadvantaged;
        ALTER TABLE certified_award_procurement DROP COLUMN joint_venture_women_owned;
        ALTER TABLE certified_award_procurement RENAME COLUMN joint_venture_women_owned_temp TO joint_venture_women_owned;
        ALTER TABLE certified_award_procurement DROP COLUMN joint_venture_economically;
        ALTER TABLE certified_award_procurement RENAME COLUMN joint_venture_economically_temp TO joint_venture_economically;
        ALTER TABLE certified_award_procurement DROP COLUMN veteran_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN veteran_owned_business_temp TO veteran_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN service_disabled_veteran_o;
        ALTER TABLE certified_award_procurement RENAME COLUMN service_disabled_veteran_o_temp TO service_disabled_veteran_o;
        ALTER TABLE certified_award_procurement DROP COLUMN contracts;
        ALTER TABLE certified_award_procurement RENAME COLUMN contracts_temp TO contracts;
        ALTER TABLE certified_award_procurement DROP COLUMN grants;
        ALTER TABLE certified_award_procurement RENAME COLUMN grants_temp TO grants;
        ALTER TABLE certified_award_procurement DROP COLUMN receives_contracts_and_gra;
        ALTER TABLE certified_award_procurement RENAME COLUMN receives_contracts_and_gra_temp TO receives_contracts_and_gra;
        ALTER TABLE certified_award_procurement DROP COLUMN airport_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN airport_authority_temp TO airport_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN council_of_governments;
        ALTER TABLE certified_award_procurement RENAME COLUMN council_of_governments_temp TO council_of_governments;
        ALTER TABLE certified_award_procurement DROP COLUMN housing_authorities_public;
        ALTER TABLE certified_award_procurement RENAME COLUMN housing_authorities_public_temp TO housing_authorities_public;
        ALTER TABLE certified_award_procurement DROP COLUMN interstate_entity;
        ALTER TABLE certified_award_procurement RENAME COLUMN interstate_entity_temp TO interstate_entity;
        ALTER TABLE certified_award_procurement DROP COLUMN planning_commission;
        ALTER TABLE certified_award_procurement RENAME COLUMN planning_commission_temp TO planning_commission;
        ALTER TABLE certified_award_procurement DROP COLUMN port_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN port_authority_temp TO port_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN transit_authority;
        ALTER TABLE certified_award_procurement RENAME COLUMN transit_authority_temp TO transit_authority;
        ALTER TABLE certified_award_procurement DROP COLUMN subchapter_s_corporation;
        ALTER TABLE certified_award_procurement RENAME COLUMN subchapter_s_corporation_temp TO subchapter_s_corporation;
        ALTER TABLE certified_award_procurement DROP COLUMN limited_liability_corporat;
        ALTER TABLE certified_award_procurement RENAME COLUMN limited_liability_corporat_temp TO limited_liability_corporat;
        ALTER TABLE certified_award_procurement DROP COLUMN foreign_owned_and_located;
        ALTER TABLE certified_award_procurement RENAME COLUMN foreign_owned_and_located_temp TO foreign_owned_and_located;
        ALTER TABLE certified_award_procurement DROP COLUMN american_indian_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN american_indian_owned_busi_temp TO american_indian_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN alaskan_native_owned_corpo;
        ALTER TABLE certified_award_procurement RENAME COLUMN alaskan_native_owned_corpo_temp TO alaskan_native_owned_corpo;
        ALTER TABLE certified_award_procurement DROP COLUMN indian_tribe_federally_rec;
        ALTER TABLE certified_award_procurement RENAME COLUMN indian_tribe_federally_rec_temp TO indian_tribe_federally_rec;
        ALTER TABLE certified_award_procurement DROP COLUMN native_hawaiian_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_hawaiian_owned_busi_temp TO native_hawaiian_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN tribally_owned_business;
        ALTER TABLE certified_award_procurement RENAME COLUMN tribally_owned_business_temp TO tribally_owned_business;
        ALTER TABLE certified_award_procurement DROP COLUMN asian_pacific_american_own;
        ALTER TABLE certified_award_procurement RENAME COLUMN asian_pacific_american_own_temp TO asian_pacific_american_own;
        ALTER TABLE certified_award_procurement DROP COLUMN black_american_owned_busin;
        ALTER TABLE certified_award_procurement RENAME COLUMN black_american_owned_busin_temp TO black_american_owned_busin;
        ALTER TABLE certified_award_procurement DROP COLUMN hispanic_american_owned_bu;
        ALTER TABLE certified_award_procurement RENAME COLUMN hispanic_american_owned_bu_temp TO hispanic_american_owned_bu;
        ALTER TABLE certified_award_procurement DROP COLUMN native_american_owned_busi;
        ALTER TABLE certified_award_procurement RENAME COLUMN native_american_owned_busi_temp TO native_american_owned_busi;
        ALTER TABLE certified_award_procurement DROP COLUMN subcontinent_asian_asian_i;
        ALTER TABLE certified_award_procurement RENAME COLUMN subcontinent_asian_asian_i_temp TO subcontinent_asian_asian_i;
        ALTER TABLE certified_award_procurement DROP COLUMN other_minority_owned_busin;
        ALTER TABLE certified_award_procurement RENAME COLUMN other_minority_owned_busin_temp TO other_minority_owned_busin;
        ALTER TABLE certified_award_procurement DROP COLUMN for_profit_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN for_profit_organization_temp TO for_profit_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN nonprofit_organization;
        ALTER TABLE certified_award_procurement RENAME COLUMN nonprofit_organization_temp TO nonprofit_organization;
        ALTER TABLE certified_award_procurement DROP COLUMN other_not_for_profit_organ;
        ALTER TABLE certified_award_procurement RENAME COLUMN other_not_for_profit_organ_temp TO other_not_for_profit_organ;
        ALTER TABLE certified_award_procurement DROP COLUMN us_local_government;
        ALTER TABLE certified_award_procurement RENAME COLUMN us_local_government_temp TO us_local_government;
    """)
    # ### end Alembic commands ###

