"""search_term to query

Revision ID: 262448a26c0c
Revises: 2c8e87e9d8f3
Create Date: 2016-05-08 21:55:08.050995

"""

# revision identifiers, used by Alembic.
revision = '262448a26c0c'
down_revision = '2c8e87e9d8f3'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('query',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('term', sa.String(length=100), nullable=True),
    sa.Column('enabled', sa.Boolean(), nullable=True),
    sa.Column('use_count', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('term')
    )
    op.drop_table('search_term')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('search_term',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('term', sa.VARCHAR(length=100), nullable=True),
    sa.Column('enabled', sa.BOOLEAN(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('query')
    ### end Alembic commands ###
