"""Add render_job_doc JSONB column to order_lines.

Stores a structured RenderJobDocument (state machine, per-step results,
timing, GPU info) alongside the legacy render_log column.

Revision ID: 048
Revises: 047
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import JSONB

revision = "048"
down_revision = "047"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "order_lines",
        sa.Column("render_job_doc", JSONB, nullable=True),
    )


def downgrade() -> None:
    op.drop_column("order_lines", "render_job_doc")
