create table profile (
  data jsonb not null,
  id text generated always as (data->>'id') stored,
  primary key (id)
);

create index idx_profile_inbox on profile using gin ((data->'inbox'));
create index idx_profile_private_key_null
    on profile ((data->>'private_key'))
    where data->>'private_key' is null;
