"""Add `availability` column to `artifacts` table

Revision ID: 08c1867e266e
Revises: 982a7c19a06c
Create Date: 2025-09-11 03:21:04.096533

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "08c1867e266e"
down_revision = "982a7c19a06c"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "artifacts", sa.Column("availability", sa.String(), nullable=False, server_default="ALIVE")
    )
    op.create_index(op.f("ix_artifacts_availability"), "artifacts", ["availability"], unique=False)
    # ### end Alembic commands ###


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