"""added_named_job_dep_fks

Revision ID: 361fbffcf08b
Revises: 9058e0136aba
Create Date: 2016-08-26 10:33:18.803848

"""

# revision identifiers, used by Alembic.
revision = '361fbffcf08b'
down_revision = '9058e0136aba'
branch_labels = None
depends_on = None

from alembic import op


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_foreign_key('fk_dep_job_id', 'job_dependency', 'job', ['job_id'], ['job_id'])
    op.create_foreign_key('fk_prereq_job_id', 'job_dependency', 'job', ['prerequisite_id'], ['job_id'])
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('fk_prereq_job_id', 'job_dependency', type_='foreignkey')
    op.drop_constraint('fk_dep_job_id', 'job_dependency', type_='foreignkey')
    ### end Alembic commands ###

