"""8th update, removes some NOT NULL constraints to allow SqlAlchemy to handle cascading deletes

Revision ID: 3659056767c5
Revises: 563495edabd3
Create Date: 2015-11-23 12:26:17.370260

"""

# revision identifiers, used by Alembic.
revision = '3659056767c5'
down_revision = '563495edabd3'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('requests', 'game_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('scores', 'game_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('scores', 'game_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('requests', 'game_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    ### end Alembic commands ###
