"""empty message

Revision ID: b1461ace189d
Revises: None
Create Date: 2016-04-18 10:51:48.584730

"""

# revision identifiers, used by Alembic.
revision = 'b1461ace189d'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('posts', 'email',
               existing_type=sa.VARCHAR(length=40),
               nullable=False)
    op.drop_constraint(u'posts_author_id_fkey', 'posts', type_='foreignkey')
    op.drop_column('posts', 'author_id')
    op.drop_column('posts', 'description')
    op.drop_column('posts', 'title')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('title', sa.VARCHAR(), autoincrement=False, nullable=False))
    op.add_column('posts', sa.Column('description', sa.VARCHAR(), autoincrement=False, nullable=False))
    op.add_column('posts', sa.Column('author_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key(u'posts_author_id_fkey', 'posts', 'users', ['author_id'], ['id'])
    op.alter_column('posts', 'email',
               existing_type=sa.VARCHAR(length=40),
               nullable=True)
    ### end Alembic commands ###
