"""Add jellyfin_id to Track and user_playlists

Revision ID: 2b8f75ed0a54
Revises: 70b2970ce195
Create Date: 2024-10-22 17:16:37.844073

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2b8f75ed0a54'
down_revision = '70b2970ce195'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('track', schema=None) as batch_op:
        batch_op.add_column(sa.Column('jellyfin_id', sa.String(length=120), nullable=True))

    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('track', schema=None) as batch_op:
        batch_op.drop_column('jellyfin_id')

    # ### end Alembic commands ###
