"""empty message

Revision ID: eb4f64b6a201
Revises: f6ebd146d0dd
Create Date: 2016-09-21 18:20:53.273000

"""

# revision identifiers, used by Alembic.
revision = 'eb4f64b6a201'
down_revision = 'f6ebd146d0dd'

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

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tickets',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=50), nullable=True),
    sa.Column('time', sa.DateTime(), nullable=False),
    sa.Column('characterID', sa.Integer(), nullable=True),
    sa.Column('message', mysql.TEXT(), nullable=True),
    sa.Column('state', sa.String(length=20), nullable=False),
    sa.ForeignKeyConstraint(['characterID'], ['characters.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_tickets_characterID'), 'tickets', ['characterID'], unique=False)
    op.create_index(op.f('ix_tickets_state'), 'tickets', ['state'], unique=False)
    op.create_index(op.f('ix_tickets_time'), 'tickets', ['time'], unique=False)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_tickets_time'), table_name='tickets')
    op.drop_index(op.f('ix_tickets_state'), table_name='tickets')
    op.drop_index(op.f('ix_tickets_characterID'), table_name='tickets')
    op.drop_table('tickets')
    ### end Alembic commands ###
