"""Adding disaster_emergency_fund_code to object_class_program_acctivity and award_financial and certified tables

Revision ID: c8f39196cbba
Revises: 229820d5d7b1
Create Date: 2020-04-23 14:50:15.504403

"""

# revision identifiers, used by Alembic.
revision = 'c8f39196cbba'
down_revision = '229820d5d7b1'
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('award_financial', sa.Column('disaster_emergency_fund_code', sa.Text(), nullable=True))
    op.add_column('certified_award_financial', sa.Column('disaster_emergency_fund_code', sa.Text(), nullable=True))
    op.add_column('certified_object_class_program_activity', sa.Column('disaster_emergency_fund_code', sa.Text(), nullable=True))
    op.add_column('object_class_program_activity', sa.Column('disaster_emergency_fund_code', sa.Text(), nullable=True))
    # ### end Alembic commands ###


def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('object_class_program_activity', 'disaster_emergency_fund_code')
    op.drop_column('certified_object_class_program_activity', 'disaster_emergency_fund_code')
    op.drop_column('certified_award_financial', 'disaster_emergency_fund_code')
    op.drop_column('award_financial', 'disaster_emergency_fund_code')
    # ### end Alembic commands ###

