"""

Revision ID: 5bd7a5db869b
Revises: 425ff5e5e715
Create Date: 2021-03-05 00:29:05.401505

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '5bd7a5db869b'
down_revision = '425ff5e5e715'
branch_labels = None
depends_on = None


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


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