towerops/priv/repo/migrations/20260203215100_add_snmpv3_to_devices.exs
2026-02-04 12:02:38 -06:00

29 lines
950 B
Elixir

defmodule Towerops.Repo.Migrations.AddSnmpv3ToDevices do
use Ecto.Migration
def change do
alter table(:devices) do
# SNMPv3 fields - all nullable for inheritance from site/organization
# Security level: "noAuthNoPriv", "authNoPriv", "authPriv"
add :snmpv3_security_level, :string
# SNMPv3 username
add :snmpv3_username, :string
# Authentication protocol: "MD5", "SHA", "SHA-224", "SHA-256", "SHA-384", "SHA-512"
add :snmpv3_auth_protocol, :string
# Authentication password (encrypted with Cloak)
add :snmpv3_auth_password, :binary
# Privacy protocol: "DES", "AES", "AES-192", "AES-256", "AES-256-C"
add :snmpv3_priv_protocol, :string
# Privacy password (encrypted with Cloak)
add :snmpv3_priv_password, :binary
# Track credential source: "device", "site", "organization"
add :snmpv3_credential_source, :string, default: "site"
end
end
end