Add 'primary' field to pids in schema