"""drop issue table


Revision ID: 5703f85b3a6a
Revises: 2d2fd2398328
Create Date: 2015-07-30 22:14:00.662051

"""

# revision identifiers, used by Alembic.
revision = '5703f85b3a6a'
down_revision = '2d2fd2398328'

from alembic import op
import sqlalchemy as sa

import logging

logger = logging.getLogger(__name__)

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('issue')
    op.drop_column('writing', 'issue_id')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('writing', sa.Column('issue_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_table('issue',
        sa.Column('id', sa.INTEGER(), nullable=False),
        sa.Column('issue_num', sa.INTEGER(), autoincrement=False, nullable=True),
        sa.Column('theme', sa.VARCHAR(), autoincrement=False, nullable=True),
        sa.PrimaryKeyConstraint('id', name=u'issue_pkey'),
        sa.UniqueConstraint('issue_num', name=u'issue_issue_num_key')
    )
    ### end Alembic commands ###
