"""Add target_language to glossaries

Revision ID: e5b2c9d1f4a8
Revises: d4a1f8e2b3c7
Create Date: 2026-05-31

Adds target_language column to glossaries table.
"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

# revision identifiers
revision = "e5b2c9d1f4a8"
down_revision = "d4a1f8e2b3c7"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column(
        "glossaries",
        sa.Column("target_language", sa.String(10), nullable=True, server_default="en"),
    )


def downgrade() -> None:
    op.drop_column("glossaries", "target_language")
