defmodule Towerops.Repo.Migrations.AddValueToCheckResults do
  use Ecto.Migration

  def change do
    alter table(:check_results) do
      # Numeric value for SNMP sensors (temperature, voltage, etc.)
      # Nullable for checks that don't produce numeric values (HTTP status checks, etc.)
      add :value, :float
    end

    # Index for querying by value ranges (e.g., temperature > 80)
    create index(:check_results, [:value])
  end
end
