"""Add jellyfin_id to Track and user_playlists, second

Revision ID: 6089eb604dbf
Revises: 7cc06fc32cc7
Create Date: 2024-10-22 21:08:41.605515

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '6089eb604dbf'
down_revision = '7cc06fc32cc7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('playlist', schema=None) as batch_op:
        batch_op.drop_column('jellyfin_id')

    with op.batch_alter_table('user_playlists', schema=None) as batch_op:
        batch_op.add_column(sa.Column('jellyfin_id', sa.String(length=120), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('user_playlists', schema=None) as batch_op:
        batch_op.drop_column('jellyfin_id')

    with op.batch_alter_table('playlist', schema=None) as batch_op:
        batch_op.add_column(sa.Column('jellyfin_id', sa.VARCHAR(length=120), autoincrement=False, nullable=True))

    # ### end Alembic commands ###
