"""empty message

Revision ID: f7a0c20d627c
Revises: cccaa431f061
Create Date: 2016-08-18 00:38:18.069909

"""

# revision identifiers, used by Alembic.
revision = 'f7a0c20d627c'
down_revision = 'cccaa431f061'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'prod_alternatives_product_id_2_fkey', 'prod_alternatives', type_='foreignkey')
    op.drop_constraint(u'prod_alternatives_product_id_1_fkey', 'prod_alternatives', type_='foreignkey')
    op.create_foreign_key(None, 'prod_alternatives', 'product', ['product_id_1'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'prod_alternatives', 'product', ['product_id_2'], ['id'], ondelete='CASCADE')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'prod_alternatives', type_='foreignkey')
    op.drop_constraint(None, 'prod_alternatives', type_='foreignkey')
    op.create_foreign_key(u'prod_alternatives_product_id_1_fkey', 'prod_alternatives', 'product', ['product_id_1'], ['id'])
    op.create_foreign_key(u'prod_alternatives_product_id_2_fkey', 'prod_alternatives', 'product', ['product_id_2'], ['id'])
    ### end Alembic commands ###
