towerops/priv/repo/migrations/20260215222949_add_billing_fields_to_integrations.exs
Graham McIntire de075ea8d9
Store billing subscriber/MRR data on integrations for dashboard
Each billing sync (Gaiia, Splynx, VISP, Sonar) already computes
subscriber counts and MRR but only stored them in sync messages.
Now persists them on the integrations table so the dashboard can
aggregate across all billing providers instead of only querying
Gaiia network sites (which were never populated).

Also fixes SnmpKit Config environment detection to use Mix.env()
as fallback when MIX_ENV env var is not set.
2026-02-15 16:51:33 -06:00

10 lines
252 B
Elixir

defmodule Towerops.Repo.Migrations.AddBillingFieldsToIntegrations do
use Ecto.Migration
def change do
alter table(:integrations) do
add :subscriber_count, :integer, default: 0
add :total_mrr, :decimal, default: 0
end
end
end