prop/priv/repo/migrations/20260418223816_add_private_to_contacts.exs
Graham McIntire 6c652ef2d4
feat(contacts): private flag with scope-aware visibility
Contacts can be marked private at submit time (single form, CSV
import, ADIF import) and edit time. Private contacts are hidden
from the public map, the public /u/callsign profile, and the
browse table for anonymous and non-owning viewers. The original
submitter and admins see them inline on the browse table with a
"Yes" badge, and the detail page shows a lock icon. Non-authorized
viewers get a 404 on the detail page.
2026-04-18 17:49:01 -05:00

14 lines
349 B
Elixir

defmodule Microwaveprop.Repo.Migrations.AddPrivateToContacts do
use Ecto.Migration
def change do
alter table(:contacts) do
add :private, :boolean, null: false, default: false
end
create index(:contacts, [:user_id],
where: "private = true",
name: :contacts_private_user_id_idx
)
end
end