"""Add executor error log

Revision ID: 981d588fe248
Revises: 0f5f85bb2ae7
Create Date: 2025-09-15 08:31:10.363449

"""

import sqlalchemy as sa
import sqlmodel
from alembic import op

# revision identifiers, used by Alembic.
revision = "981d588fe248"
down_revision = "0f5f85bb2ae7"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("jobv2", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "executor_error_log",
                sqlmodel.sql.sqltypes.AutoString(),
                nullable=True,
            )
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("jobv2", schema=None) as batch_op:
        batch_op.drop_column("executor_error_log")

    # ### end Alembic commands ###
