"""Remove defaults for columns.

Revision ID: afd66ee7c0e0
Revises: 
Create Date: 2016-12-07 16:32:31.153995

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('arcade', 'paseli_enabled',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=None,
               existing_nullable=True)
    op.alter_column('arcade', 'paseli_infinite',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=None,
               existing_nullable=True)
    op.alter_column('score', 'plays',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=None,
               existing_nullable=False)
    op.alter_column('score_history', 'new_record',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=None,
               existing_nullable=False)
    op.alter_column('user', 'admin',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=None,
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user', 'admin',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=sa.text("'0'"),
               existing_nullable=True)
    op.alter_column('score_history', 'new_record',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=sa.text("'0'"),
               existing_nullable=False)
    op.alter_column('score', 'plays',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=sa.text("'0'"),
               existing_nullable=False)
    op.alter_column('arcade', 'paseli_infinite',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=sa.text("'0'"),
               existing_nullable=True)
    op.alter_column('arcade', 'paseli_enabled',
               existing_type=mysql.INTEGER(display_width=11),
               server_default=sa.text("'0'"),
               existing_nullable=True)
    # ### end Alembic commands ###
