"""commit

Revision ID: dbe0eecfe825
Revises: ca98fc844cc0
Create Date: 2020-09-21 15:11:40.459188

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'dbe0eecfe825'
down_revision = 'ca98fc844cc0'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('comments',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('comment', sa.String(), nullable=True),
    sa.Column('posted', sa.DateTime(), nullable=True),
    sa.Column('pitch_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['pitch_id'], ['pitches.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('pitches', sa.Column('downvote', sa.Integer(), nullable=True))
    op.add_column('pitches', sa.Column('upvote', sa.Integer(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('pitches', 'upvote')
    op.drop_column('pitches', 'downvote')
    op.drop_table('comments')
    # ### end Alembic commands ###
