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

  def change do
    alter table(:beacons) do
      add :approved, :boolean, null: false, default: false
    end

    # Existing beacons were admin-created, so mark them approved.
    execute "UPDATE beacons SET approved = true", ""
  end
end
