"""empty message

Revision ID: 2f9ccc3bb8ee
Revises: a30b7cdc449f
Create Date: 2020-09-20 16:06:12.895035

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2f9ccc3bb8ee'
down_revision = 'a30b7cdc449f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('artistgenre_artist_id_fkey', 'artistgenre', type_='foreignkey')
    op.drop_constraint('artistgenre_genre_id_fkey', 'artistgenre', type_='foreignkey')
    op.create_foreign_key(None, 'artistgenre', 'genre', ['genre_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'artistgenre', 'artist', ['artist_id'], ['id'], ondelete='CASCADE')
    op.drop_constraint('venuegenre_venue_id_fkey', 'venuegenre', type_='foreignkey')
    op.drop_constraint('venuegenre_genre_id_fkey', 'venuegenre', type_='foreignkey')
    op.create_foreign_key(None, 'venuegenre', 'venue', ['venue_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'venuegenre', 'genre', ['genre_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'venuegenre', type_='foreignkey')
    op.drop_constraint(None, 'venuegenre', type_='foreignkey')
    op.create_foreign_key('venuegenre_genre_id_fkey', 'venuegenre', 'genre', ['genre_id'], ['id'])
    op.create_foreign_key('venuegenre_venue_id_fkey', 'venuegenre', 'venue', ['venue_id'], ['id'])
    op.drop_constraint(None, 'artistgenre', type_='foreignkey')
    op.drop_constraint(None, 'artistgenre', type_='foreignkey')
    op.create_foreign_key('artistgenre_genre_id_fkey', 'artistgenre', 'genre', ['genre_id'], ['id'])
    op.create_foreign_key('artistgenre_artist_id_fkey', 'artistgenre', 'artist', ['artist_id'], ['id'])
    # ### end Alembic commands ###
