organization_read_model_heads API Postgres table
Transactional cursor heads and lane stamps for organization-scoped administrative read models.
Declared in packages/api-shared/src/schema/organizationReadModels.ts
Description
A source mutation increments cursor and stamps every lane it changed with the new value in one update of this row. The increment rolls back with the mutation and holds the row lock until commit, so allocation order matches commit order. A lane changed after a client's cursor exactly when its stamp is greater. Per-group membership changes are stamped on groups rows and deletions on organization_group_tombstones. All stamps are display-sync metadata only, never authorization or cryptographic keying inputs.
Columns
organization_iduuid- primary key
- not null
Organization the head belongs to, one row each. Provisioning creates it and organization purge deletes it last.
cursorbigint- not null
- default 0
The last cursor a source mutation allocated, starting at 0. A client passes the cursor it holds back to read only the lanes changed since.
directory_cursorbigint- not null
- default 0
Cursor of the last change to the
directorylane: roster entries, member profiles, two-factor requirements, and leave requests.grants_cursorbigint- not null
- default 0
group_memberships_cursorbigint- not null
- default 0
Cursor of the last group membership change or group deletion. Each changed group carries its own stamp, so a delta returns only those.
groups_cursorbigint- not null
- default 0
Cursor of the last change to the group catalog: a group created, deleted, or given a new signed policy (other than Members).
organization_policy_cursorbigint- not null
- default 0
Cursor of the last commit to the organization's own signed policy.
updated_attimestamp- not null
- default now()
When a source mutation last advanced
cursor, or the row's creation.