alter table if exists event_registrations
  add column if not exists checked_in_by_staff_id uuid references staff_accounts(id) on delete set null,
  add column if not exists checkin_source text not null default '',
  add column if not exists checkin_note text not null default '';

create index if not exists idx_event_registrations_checkin_staff
  on event_registrations(checked_in_by_staff_id, checked_in_at desc);
