defmodule Microwaveprop.Repo.Migrations.CreateBeacons do use Ecto.Migration def change do create table(:beacons, primary_key: false) do add :id, :binary_id, primary_key: true add :frequency_mhz, :float add :callsign, :string add :grid, :string add :lat, :float add :lon, :float add :power_watts, :float add :height_m, :float add :user_id, references(:users, type: :binary_id, on_delete: :delete_all) timestamps(type: :utc_datetime) end create index(:beacons, [:user_id]) end end