"""Add last_heartbeat_at field

Revision ID: 9641582c0bf9
Revises: 2d23b5a05254
Create Date: 2025-09-05 19:08:17.334665

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "9641582c0bf9"
down_revision: Union[str, None] = "2d23b5a05254"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "agent_instances", sa.Column("last_heartbeat_at", sa.DateTime(), nullable=True)
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("agent_instances", "last_heartbeat_at")
    # ### end Alembic commands ###
