"""Add multicolumn indexes to published_award_financial_assistance

Revision ID: ae35bd44ec9a
Revises: 66ce64f4c1da
Create Date: 2018-09-19 09:15:27.852093

"""

# revision identifiers, used by Alembic.
revision = 'ae35bd44ec9a'
down_revision = '66ce64f4c1da'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('ix_pafa_fain_awarding_sub_tier_is_active', 'published_award_financial_assistance', ['fain', 'awarding_sub_tier_agency_c', 'is_active'], unique=False)
    op.create_index('ix_pafa_uri_awarding_sub_tier_is_active', 'published_award_financial_assistance', ['uri', 'awarding_sub_tier_agency_c', 'is_active'], unique=False)
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_pafa_uri_awarding_sub_tier_is_active', table_name='published_award_financial_assistance')
    op.drop_index('ix_pafa_fain_awarding_sub_tier_is_active', table_name='published_award_financial_assistance')
    # ### end Alembic commands ###

