"""error_links_2

Revision ID: 58a877020ce
Revises: 237b922fac1
Create Date: 2015-11-19 22:52:20.515494

"""

# revision identifiers, used by Alembic.
revision = '58a877020ce'
down_revision = '237b922fac1'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('session_error')
    op.drop_table('test_error')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('test_error',
    sa.Column('test_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('error_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['error_id'], ['error.id'], name='test_error_error_id_fkey', ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['test_id'], ['test.id'], name='test_error_test_id_fkey', ondelete='CASCADE')
    )
    op.create_table('session_error',
    sa.Column('session_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('error_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['error_id'], ['error.id'], name='session_error_error_id_fkey', ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['session_id'], ['session.id'], name='session_error_session_id_fkey', ondelete='CASCADE')
    )
    ### end Alembic commands ###
