"""ninenth migration

Revision ID: 57a364f0a315
Revises: 30ebd98d5820
Create Date: 2019-02-28 09:53:37.946078

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '57a364f0a315'
down_revision = '30ebd98d5820'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('comments', sa.Column('comment', sa.String(length=255), nullable=True))
    op.add_column('comments', sa.Column('comment_writer', sa.String(), nullable=True))
    op.drop_column('comments', 'pitch_title')
    op.drop_column('comments', 'pitch_message')
    op.drop_column('comments', 'pitch_writer')
    op.add_column('pitches', sa.Column('category', sa.String(), nullable=True))
    op.add_column('pitches', sa.Column('pitch_content', sa.String(length=255), nullable=True))
    op.add_column('pitches', sa.Column('pitch_title', sa.String(), nullable=True))
    op.drop_column('pitches', 'category_title')
    op.drop_column('pitches', 'category_contents')
    op.drop_column('pitches', 'category_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('pitches', sa.Column('category_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('pitches', sa.Column('category_contents', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('pitches', sa.Column('category_title', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('pitches', 'pitch_title')
    op.drop_column('pitches', 'pitch_content')
    op.drop_column('pitches', 'category')
    op.add_column('comments', sa.Column('pitch_writer', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('comments', sa.Column('pitch_message', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.add_column('comments', sa.Column('pitch_title', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
    op.drop_column('comments', 'comment_writer')
    op.drop_column('comments', 'comment')
    # ### end Alembic commands ###
