"""empty message

Revision ID: 91a5e1ae4ff9
Revises: 
Create Date: 2019-10-21 16:46:13.960771

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '91a5e1ae4ff9'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('artist',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('hometown', sa.String(length=120), nullable=True),
    sa.Column('description', sa.String(length=120), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_artist_description'), 'artist', ['description'], unique=False)
    op.create_index(op.f('ix_artist_hometown'), 'artist', ['hometown'], unique=False)
    op.create_index(op.f('ix_artist_name'), 'artist', ['name'], unique=False)
    op.create_table('venue',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('title', sa.String(length=140), nullable=True),
    sa.Column('city', sa.String(length=140), nullable=True),
    sa.Column('state', sa.String(length=140), nullable=True),
    sa.Column('capacity', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_venue_capacity'), 'venue', ['capacity'], unique=False)
    op.create_index(op.f('ix_venue_city'), 'venue', ['city'], unique=False)
    op.create_index(op.f('ix_venue_state'), 'venue', ['state'], unique=False)
    op.create_index(op.f('ix_venue_title'), 'venue', ['title'], unique=False)
    op.create_table('event',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('title', sa.String(length=140), nullable=True),
    sa.Column('date', sa.DateTime(), nullable=True),
    sa.Column('venueID', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['venueID'], ['venue.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_event_date'), 'event', ['date'], unique=False)
    op.create_table('artist_to_event',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('artistID', sa.Integer(), nullable=True),
    sa.Column('eventID', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['artistID'], ['artist.id'], ),
    sa.ForeignKeyConstraint(['eventID'], ['event.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('artist_to_event')
    op.drop_index(op.f('ix_event_date'), table_name='event')
    op.drop_table('event')
    op.drop_index(op.f('ix_venue_title'), table_name='venue')
    op.drop_index(op.f('ix_venue_state'), table_name='venue')
    op.drop_index(op.f('ix_venue_city'), table_name='venue')
    op.drop_index(op.f('ix_venue_capacity'), table_name='venue')
    op.drop_table('venue')
    op.drop_index(op.f('ix_artist_name'), table_name='artist')
    op.drop_index(op.f('ix_artist_hometown'), table_name='artist')
    op.drop_index(op.f('ix_artist_description'), table_name='artist')
    op.drop_table('artist')
    # ### end Alembic commands ###
