"""add thumbnail

Revision ID: 319c576b301f
Revises: 48addea83a97
Create Date: 2016-01-13 17:11:40.712747

"""

# revision identifiers, used by Alembic.
revision = '319c576b301f'
down_revision = '48addea83a97'

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('thumbnail',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('key', sa.String(length=128), nullable=True),
    sa.Column('domain', sa.String(length=128), nullable=True),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_thumbnail_key'), 'thumbnail', ['key'], unique=False)
    op.drop_table('setting')
    op.add_column('complaint', sa.Column('is_read', sa.Boolean(), nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('complaint', 'is_read')
    op.create_table('setting',
    sa.Column('key', mysql.VARCHAR(length=128), nullable=False),
    sa.Column('value', mysql.VARCHAR(length=128), nullable=True),
    sa.Column('humanized', mysql.VARCHAR(length=128), nullable=True),
    sa.PrimaryKeyConstraint('key'),
    mysql_default_charset=u'utf8',
    mysql_engine=u'InnoDB'
    )
    op.drop_index(op.f('ix_thumbnail_key'), table_name='thumbnail')
    op.drop_table('thumbnail')
    ### end Alembic commands ###
