"""empty message

Revision ID: 46e4a69e7ed2
Revises: 6a93a3640b40
Create Date: 2020-12-22 21:01:16.518957

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '46e4a69e7ed2'
down_revision = '6a93a3640b40'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Artist_genres',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('Artist_id', sa.Integer(), nullable=True),
    sa.Column('genre', sa.String(), nullable=False),
    sa.ForeignKeyConstraint(['Artist_id'], ['Artist.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('Venue_genres',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('Venue_id', sa.Integer(), nullable=True),
    sa.Column('genre', sa.String(), nullable=False),
    sa.ForeignKeyConstraint(['Venue_id'], ['Venue.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('Genres')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Genres',
    sa.Column('id', sa.INTEGER(), server_default=sa.text('nextval(\'"Genres_id_seq"\'::regclass)'), autoincrement=True, nullable=False),
    sa.Column('Venue_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('genre', sa.VARCHAR(), autoincrement=False, nullable=False),
    sa.ForeignKeyConstraint(['Venue_id'], ['Venue.id'], name='Genres_Venue_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='Genres_pkey')
    )
    op.drop_table('Venue_genres')
    op.drop_table('Artist_genres')
    # ### end Alembic commands ###
