"""Add some count fields to Question & Answer model.

Revision ID: 41e2fee079b
Revises: 53468a636652
Create Date: 2015-05-30 13:04:34.776934

"""

# revision identifiers, used by Alembic.
revision = '41e2fee079b'
down_revision = '53468a636652'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('answer', sa.Column('comments_count', sa.Integer(), nullable=True))
    op.add_column('answer', sa.Column('downvotes_count', sa.Integer(), nullable=True))
    op.add_column('answer', sa.Column('nohelps_count', sa.Integer(), nullable=True))
    op.add_column('answer', sa.Column('thanks_count', sa.Integer(), nullable=True))
    op.add_column('answer', sa.Column('upvotes_count', sa.Integer(), nullable=True))
    op.add_column('question', sa.Column('answers_count', sa.Integer(), nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('question', 'answers_count')
    op.drop_column('answer', 'upvotes_count')
    op.drop_column('answer', 'thanks_count')
    op.drop_column('answer', 'nohelps_count')
    op.drop_column('answer', 'downvotes_count')
    op.drop_column('answer', 'comments_count')
    ### end Alembic commands ###
