"""Added not nullable to user_id

Revision ID: 554178515c27
Revises: 335e48271836
Create Date: 2017-07-30 18:09:29.519639

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

# revision identifiers, used by Alembic.
revision = "554178515c27"
down_revision = "335e48271836"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "videos",
        "user_id",
        existing_type=mysql.INTEGER(display_width=11),
        nullable=False,
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "videos",
        "user_id",
        existing_type=mysql.INTEGER(display_width=11),
        nullable=True,
    )
    # ### end Alembic commands ###
