defmodule Microwaveprop.Repo.Migrations.RenameBand3456To3400 do
  use Ecto.Migration

  # US 9cm amateur allocation was cut from 3300-3500 to 3300-3450 MHz in
  # 2020, so the legacy 3456 weak-signal calling frequency is no longer
  # in-band. Canonicalize existing contacts on the new 3400 value.
  def up do
    execute "UPDATE contacts SET band = 3400 WHERE band = 3456"
  end

  def down do
    execute "UPDATE contacts SET band = 3456 WHERE band = 3400"
  end
end
