"""empty message

Revision ID: 30d8614933c0
Revises: 86892c36683f
Create Date: 2021-06-17 06:19:09.906800

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '30d8614933c0'
down_revision = '86892c36683f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('Artist_shows_id_fkey', 'Artist', type_='foreignkey')
    op.drop_column('Artist', 'shows_id')
    op.add_column('Shows', sa.Column('artist_id', sa.Integer(), nullable=True))
    op.add_column('Shows', sa.Column('venue_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'Shows', 'Venue', ['venue_id'], ['id'])
    op.create_foreign_key(None, 'Shows', 'Artist', ['artist_id'], ['id'])
    op.drop_constraint('Venue_shows_id_fkey', 'Venue', type_='foreignkey')
    op.drop_column('Venue', 'shows_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Venue', sa.Column('shows_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('Venue_shows_id_fkey', 'Venue', 'Shows', ['shows_id'], ['id'])
    op.drop_constraint(None, 'Shows', type_='foreignkey')
    op.drop_constraint(None, 'Shows', type_='foreignkey')
    op.drop_column('Shows', 'venue_id')
    op.drop_column('Shows', 'artist_id')
    op.add_column('Artist', sa.Column('shows_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('Artist_shows_id_fkey', 'Artist', 'Shows', ['shows_id'], ['id'])
    # ### end Alembic commands ###
