prop/priv/repo/migrations/20260330174211_create_commercial_links.exs
Graham McIntire 10e8feb486
Add commercial link monitoring via SNMP polling
Poll UBNT AirFiber radios (AF11X + AF60-LR) every 5 minutes via
net-snmp CLI, storing signal metrics in commercial_samples. Fetches
ASOS weather alongside each cycle for propagation correlation.

Includes 7 seeded link definitions, Oban cron worker, and net-snmp
in the Docker image.
2026-03-30 13:02:59 -05:00

22 lines
697 B
Elixir

defmodule Microwaveprop.Repo.Migrations.CreateCommercialLinks do
use Ecto.Migration
def change do
create table(:commercial_links, primary_key: false) do
add :id, :binary_id, primary_key: true
add :label, :string, null: false
add :host, :string, null: false
add :community, :string, null: false
add :radio_type, :string, null: false, default: "af11x"
add :endpoint_a, :map
add :endpoint_b, :map
add :weather_station, :string
add :enabled, :boolean, null: false, default: true
timestamps(type: :utc_datetime)
end
create unique_index(:commercial_links, [:label])
create index(:commercial_links, [:enabled])
end
end