"""add language column to marketplace_import_jobs

Revision ID: b412e0b49c2e
Revises: 91d02647efae
Create Date: 2025-12-13 13:35:46.524893

"""
from collections.abc import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "b412e0b49c2e"
down_revision: str | None = "91d02647efae"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # Add language column with default value for existing rows
    op.add_column(
        "marketplace_import_jobs",
        sa.Column("language", sa.String(length=5), nullable=False, server_default="en")
    )


def downgrade() -> None:
    op.drop_column("marketplace_import_jobs", "language")
