"""add status to user flagged documents

Revision ID: 967bdad10d92
Revises: 577135dba652
Create Date: 2016-10-03 19:48:32.150007

"""

# revision identifiers, used by Alembic.
revision = '967bdad10d92'
down_revision = '577135dba652'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user_flagged_documents', sa.Column('status', sa.Text(), nullable=True))
    op.create_index('user_flagged_doc_status_severity_index', 'user_flagged_documents', ['status', 'issue_severity'], unique=False)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('user_flagged_doc_status_severity_index', table_name='user_flagged_documents')
    op.drop_column('user_flagged_documents', 'status')
    ### end Alembic commands ###
