"""Add upper index to uri in published_award_financial_assistance table

Revision ID: d7e1a2433dca
Revises: 0dc4a1fbb52e
Create Date: 2019-09-06 10:16:37.579507

"""

# revision identifiers, used by Alembic.
revision = 'd7e1a2433dca'
down_revision = '0dc4a1fbb52e'
branch_labels = None
depends_on = None

from alembic import op
from sqlalchemy import text


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_uri_upper', 'published_award_financial_assistance', [text('UPPER(uri)')], unique=False)
    # ### end Alembic commands ###


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

