"""add provision_failed to InstanceStatus enum

Revision ID: 020
Revises: 019
Create Date: 2026-05-19
"""
from alembic import op

revision = "020"
down_revision = "019"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.execute(
        "ALTER TABLE instances MODIFY COLUMN status ENUM("
        "'provisioning','active','suspended','terminated','failed','provision_failed'"
        ") NOT NULL DEFAULT 'provisioning'"
    )


def downgrade() -> None:
    op.execute(
        "ALTER TABLE instances MODIFY COLUMN status ENUM("
        "'provisioning','active','suspended','terminated','failed'"
        ") NOT NULL DEFAULT 'provisioning'"
    )
