"""Updated post likes and dislikes to be not nullable

Revision ID: 6024cdd094f9
Revises: f8c8d0810fd5
Create Date: 2020-12-16 20:00:01.324139

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6024cdd094f9'
down_revision = 'f8c8d0810fd5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('posts', 'total_dislikes',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('posts', 'total_likes',
               existing_type=sa.INTEGER(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('posts', 'total_likes',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('posts', 'total_dislikes',
               existing_type=sa.INTEGER(),
               nullable=True)
    # ### end Alembic commands ###
