"""Rename correction_late_delete_ind to correction_delete_indicatr

Revision ID: 654507a3934c
Revises: c36ce06daaa1
Create Date: 2018-03-08 12:48:18.473011

"""

# revision identifiers, used by Alembic.
revision = '654507a3934c'
down_revision = 'c36ce06daaa1'
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.execute("ALTER TABLE award_financial_assistance RENAME COLUMN correction_late_delete_ind TO correction_delete_indicatr")
    op.drop_index(op.f('ix_award_financial_assistance_correction_late_delete_ind'), table_name='award_financial_assistance')
    op.create_index(op.f('ix_award_financial_assistance_correction_delete_indicatr'), 'award_financial_assistance', ['correction_delete_indicatr'], unique=False)

    op.execute("ALTER TABLE detached_award_financial_assistance RENAME COLUMN correction_late_delete_ind TO correction_delete_indicatr")
    op.drop_index(op.f('ix_detached_award_financial_assistance_correction_late_delete_ind'), table_name='detached_award_financial_assistance')
    op.create_index(op.f('ix_detached_award_financial_assistance_correction_delete_indicatr'), 'detached_award_financial_assistance', ['correction_delete_indicatr'], unique=False)

    op.execute("ALTER TABLE published_award_financial_assistance RENAME COLUMN correction_late_delete_ind TO correction_delete_indicatr")
    op.drop_index(op.f('ix_published_award_financial_assistance_correction_late_delete_ind'), table_name='published_award_financial_assistance')
    op.create_index(op.f('ix_published_award_financial_assistance_correction_delete_indicatr'), 'published_award_financial_assistance', ['correction_delete_indicatr'], unique=False)
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.execute("ALTER TABLE award_financial_assistance RENAME COLUMN correction_delete_indicatr TO correction_late_delete_ind")
    op.drop_index(op.f('ix_award_financial_assistance_correction_delete_indicatr'), table_name='award_financial_assistance')
    op.create_index(op.f('ix_award_financial_assistance_correction_late_delete_ind'), 'award_financial_assistance', ['correction_late_delete_ind'], unique=False)

    op.execute("ALTER TABLE detached_award_financial_assistance RENAME COLUMN correction_delete_indicatr TO correction_late_delete_ind")
    op.drop_index(op.f('ix_detached_award_financial_assistance_correction_delete_indicatr'), table_name='detached_award_financial_assistance')
    op.create_index(op.f('ix_detached_award_financial_assistance_correction_late_delete_ind'), 'detached_award_financial_assistance', ['correction_late_delete_ind'], unique=False)

    op.execute("ALTER TABLE published_award_financial_assistance RENAME COLUMN correction_delete_indicatr TO correction_late_delete_ind")
    op.drop_index(op.f('ix_published_award_financial_assistance_correction_delete_indicatr'), table_name='published_award_financial_assistance')
    op.create_index(op.f('ix_published_award_financial_assistance_correction_late_delete_ind'), 'published_award_financial_assistance', ['correction_late_delete_ind'], unique=False)
    ### end Alembic commands ###

