"""empty message

Revision ID: 39bd3a483b48
Revises: 738b48d818a8
Create Date: 2020-05-27 22:39:03.529838

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '39bd3a483b48'
down_revision = '738b48d818a8'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('questions', 'answer_attempt_count',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('questions', 'answer_success_count',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.create_unique_constraint(None, 'questions', ['question'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'questions', type_='unique')
    op.alter_column('questions', 'answer_success_count',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('questions', 'answer_attempt_count',
               existing_type=sa.INTEGER(),
               nullable=True)
    # ### end Alembic commands ###
