"""empty message

Revision ID: 57128d66cc33
Revises: 324666fdfa8a
Create Date: 2016-08-09 12:52:17.791059

"""

# revision identifiers, used by Alembic.
revision = '57128d66cc33'
down_revision = '324666fdfa8a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(u'tag_prod_association_product_id_fkey', 'tag_prod_association', type_='foreignkey')
    op.drop_constraint(u'tag_prod_association_tag_name_fkey', 'tag_prod_association', type_='foreignkey')
    op.create_foreign_key(None, 'tag_prod_association', 'tag', ['tag_name'], ['name'], ondelete='CASCADE')
    op.create_foreign_key(None, 'tag_prod_association', 'product', ['product_id'], ['id'], ondelete='CASCADE')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'tag_prod_association', type_='foreignkey')
    op.drop_constraint(None, 'tag_prod_association', type_='foreignkey')
    op.create_foreign_key(u'tag_prod_association_tag_name_fkey', 'tag_prod_association', 'tag', ['tag_name'], ['name'])
    op.create_foreign_key(u'tag_prod_association_product_id_fkey', 'tag_prod_association', 'product', ['product_id'], ['id'])
    ### end Alembic commands ###
