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

  def change do
    alter table(:organizations) do
      # SNMPv3 security level: "noAuthNoPriv", "authNoPriv", "authPriv"
      add :snmpv3_security_level, :string

      # SNMPv3 username (context)
      add :snmpv3_username, :string

      # Authentication protocol: "MD5", "SHA", "SHA-224", "SHA-256", "SHA-384", "SHA-512"
      add :snmpv3_auth_protocol, :string, default: "SHA-256"

      # 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, default: "AES"

      # Privacy password (encrypted with Cloak)
      add :snmpv3_priv_password, :binary
    end
  end
end
