"""Creates the events table and adds columns.

Revision ID: 993142283a07
Revises: 7f41a1000836
Create Date: 2016-10-30 23:21:02.111663

"""

# revision identifiers, used by Alembic.
revision = '993142283a07'
down_revision = '7f41a1000836'

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

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('events',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('eb_name_html', sa.String(length=255), nullable=False),
    sa.Column('eb_description_html', sa.Text()),
    sa.Column('eb_id', sa.String(length=90), nullable=False),
    sa.Column('eb_url', sa.String(length=255), nullable=False),
    sa.Column('eb_start_utc', sa.String(length=90), nullable=True),
    sa.Column('eb_end_utc', sa.String(length=90), nullable=True),
    sa.Column('eb_capacity', sa.Integer(), nullable=True),
    sa.Column('eb_venue', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('events')
    ### end Alembic commands ###
