"""Version_0011

Revision ID: 8204e3eb0698
Revises: 0a9a850524f2
Create Date: 2017-09-07 14:57:00.389749

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8204e3eb0698'
down_revision = '0a9a850524f2'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('notices', sa.Column('latest_modify_date', sa.String(length=128), nullable=True))
    op.add_column('notices', sa.Column('old_content', sa.String(length=1024), nullable=True))
    op.add_column('notices', sa.Column('old_species', sa.String(length=128), nullable=True))
    op.add_column('notices', sa.Column('old_title', sa.String(length=512), nullable=True))
    op.create_index(op.f('ix_notices_latest_modify_date'), 'notices', ['latest_modify_date'], unique=False)
    op.create_index(op.f('ix_notices_old_content'), 'notices', ['old_content'], unique=False)
    op.create_index(op.f('ix_notices_old_species'), 'notices', ['old_species'], unique=False)
    op.create_index(op.f('ix_notices_old_title'), 'notices', ['old_title'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_notices_old_title'), table_name='notices')
    op.drop_index(op.f('ix_notices_old_species'), table_name='notices')
    op.drop_index(op.f('ix_notices_old_content'), table_name='notices')
    op.drop_index(op.f('ix_notices_latest_modify_date'), table_name='notices')
    op.drop_column('notices', 'old_title')
    op.drop_column('notices', 'old_species')
    op.drop_column('notices', 'old_content')
    op.drop_column('notices', 'latest_modify_date')
    # ### end Alembic commands ###
