"""Add `remote_status` to `artifact_revision`

Revision ID: fa3dd7f77c19
Revises: 82f4d3dea750
Create Date: 2025-09-30 10:49:45.228649

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "fa3dd7f77c19"
down_revision = "82f4d3dea750"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "artifact_revisions",
        sa.Column("remote_status", sa.String(), nullable=True, server_default=sa.null()),
    )
    op.create_index(
        op.f("ix_artifact_revisions_remote_status"),
        "artifact_revisions",
        ["remote_status"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_artifact_revisions_remote_status"), table_name="artifact_revisions")
    op.drop_column("artifact_revisions", "remote_status")
    # ### end Alembic commands ###
