"""empty message

Revision ID: c7bf02b3dbe0
Revises: 23a9f430205f
Create Date: 2020-05-03 03:14:20.731225

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'c7bf02b3dbe0'
down_revision = '23a9f430205f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('Artist', 'upcoming_shows')
    op.drop_column('Artist', 'past_shows_count')
    op.drop_column('Artist', 'past_shows')
    op.drop_column('Artist', 'upcoming_shows_count')
    op.add_column('Show_Artist', sa.Column('show_artist', sa.Integer(), nullable=False))
    op.drop_constraint('Show_Artist_show_venue_fkey', 'Show_Artist', type_='foreignkey')
    op.create_foreign_key(None, 'Show_Artist', 'Artist', ['show_artist'], ['id'])
    op.drop_column('Show_Artist', 'show_venue')
    op.add_column('Show_Venue', sa.Column('show_venue', sa.Integer(), nullable=False))
    op.drop_constraint('Show_Venue_show_artist_fkey', 'Show_Venue', type_='foreignkey')
    op.create_foreign_key(None, 'Show_Venue', 'Venue', ['show_venue'], ['id'])
    op.drop_column('Show_Venue', 'show_artist')
    op.drop_column('Venue', 'past_shows_count')
    op.drop_column('Venue', 'past_shows')
    op.drop_column('Venue', 'upcoming_shows')
    op.drop_column('Venue', 'upcoming_shows_count')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Venue', sa.Column('upcoming_shows_count', sa.VARCHAR(length=120), autoincrement=False, nullable=True))
    op.add_column('Venue', sa.Column('upcoming_shows', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
    op.add_column('Venue', sa.Column('past_shows', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
    op.add_column('Venue', sa.Column('past_shows_count', sa.VARCHAR(length=120), autoincrement=False, nullable=True))
    op.add_column('Show_Venue', sa.Column('show_artist', sa.INTEGER(), autoincrement=False, nullable=False))
    op.drop_constraint(None, 'Show_Venue', type_='foreignkey')
    op.create_foreign_key('Show_Venue_show_artist_fkey', 'Show_Venue', 'Artist', ['show_artist'], ['id'])
    op.drop_column('Show_Venue', 'show_venue')
    op.add_column('Show_Artist', sa.Column('show_venue', sa.INTEGER(), autoincrement=False, nullable=False))
    op.drop_constraint(None, 'Show_Artist', type_='foreignkey')
    op.create_foreign_key('Show_Artist_show_venue_fkey', 'Show_Artist', 'Venue', ['show_venue'], ['id'])
    op.drop_column('Show_Artist', 'show_artist')
    op.add_column('Artist', sa.Column('upcoming_shows_count', sa.VARCHAR(length=120), autoincrement=False, nullable=True))
    op.add_column('Artist', sa.Column('past_shows', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
    op.add_column('Artist', sa.Column('past_shows_count', sa.VARCHAR(length=120), autoincrement=False, nullable=True))
    op.add_column('Artist', sa.Column('upcoming_shows', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
    # ### end Alembic commands ###
