"""Add queue_manager id to Base_results

Revision ID: 4bb79efa9855
Revises: 26cfd7b0439e
Create Date: 2019-07-26 15:31:14.811337

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4bb79efa9855'
down_revision = '26cfd7b0439e'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('base_result', sa.Column('manager_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'base_result', 'queue_manager', ['manager_id'], ['id'], ondelete='SET NULL')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'base_result', type_='foreignkey')
    op.drop_column('base_result', 'manager_id')
    # ### end Alembic commands ###

Add db migration to add manager_id to base_results
Add db migration to add manager_id to base_results
