"""add runner and entry columns (additive)

Revision ID: e638cec9a12a
Revises: e049f04085b3
Create Date: 2026-06-28 18:23:36.042695

"""

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

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


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("jobs", sa.Column("runner", sa.JSON(), nullable=True))
    op.add_column("registered_jobs", sa.Column("runner", sa.JSON(), nullable=True))
    op.add_column("tasks", sa.Column("entry_type", sa.String(), nullable=True))
    op.add_column("tasks", sa.Column("command", sa.JSON(), nullable=True))
    op.add_column("tasks", sa.Column("command_env", sa.JSON(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("tasks", "command_env")
    op.drop_column("tasks", "command")
    op.drop_column("tasks", "entry_type")
    op.drop_column("registered_jobs", "runner")
    op.drop_column("jobs", "runner")
    # ### end Alembic commands ###
