"""add submission_id to PublishedAFA

Revision ID: 03257ae6000f
Revises: 4d66a8d6e11b
Create Date: 2017-10-26 09:57:31.577694

"""

# revision identifiers, used by Alembic.
revision = '03257ae6000f'
down_revision = '4d66a8d6e11b'
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.add_column('published_award_financial_assistance', sa.Column('submission_id', sa.Numeric(), nullable=True))
    op.create_index(op.f('ix_published_award_financial_assistance_submission_id'), 'published_award_financial_assistance', ['submission_id'], unique=False)
    ### end Alembic commands ###


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

