"""Add non-nullable constraint to foreign key

Revision ID: 3d598a81a5af
Revises: bcd38fbfb3cc
Create Date: 2021-07-13 19:19:02.840859

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '3d598a81a5af'
down_revision = 'bcd38fbfb3cc'
branch_labels = None
depends_on = None


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


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