organization_read_model_directory_users Client SQLite table
Normalized organization directory rows. isSelf is derived at read time. Rows keep key fingerprints only; keys come from the trusted identity store.
Declared in packages/client-sdk/src/data/sqlite/schema/organizationReadModelSchema.ts
Columns
organization_idtext- not null
Organization whose directory lists the user.
user_idtext- not null
Listed user.
sort_orderinteger- not null
Zero-based position in the served directory; reads sort by it.
signing_key_fingerprinttext- not null
Hex SHA-256 fingerprint of the user's root signing public key.
encapsulation_key_fingerprinttext- not null
Hex SHA-256 fingerprint of the user's encapsulation public key.
is_personal_organization_ownerinteger- not null
True when this organization is the user's personal organization.
created_attext- not null
ISO-8601 creation time of the user's account.
statustext- not null
Roster status:
activeordisabled.profile_document_idtext- nullable
Id of the member's encrypted roster profile document, or null.
joined_attext- not null
ISO-8601 time the user first appeared in the organization's roster.
updated_attext- not null
ISO-8601 time the server last changed the roster entry.
disabled_attext- nullable
ISO-8601 time the member was disabled; null while active.
disabled_by_user_idtext- nullable
User who disabled the member; null while active or when the server recorded none.
leave_requesttext- nullable
A pending leave request, as JSON, kept only once its signature verified.
two_factor_requiredinteger- not null
- default 0
An administrator requires this member to sign in with two-factor.
Keys and constraints
- Primary key
(organization_id, user_id)
DDL
The statements the client runs to create this table and its indexes.
CREATE TABLE IF NOT EXISTS "organization_read_model_directory_users" (
"organization_id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"sort_order" INTEGER NOT NULL,
"signing_key_fingerprint" TEXT NOT NULL,
"encapsulation_key_fingerprint" TEXT NOT NULL,
"is_personal_organization_owner" INTEGER NOT NULL,
"created_at" TEXT NOT NULL,
"status" TEXT NOT NULL,
"profile_document_id" TEXT,
"joined_at" TEXT NOT NULL,
"updated_at" TEXT NOT NULL,
"disabled_at" TEXT,
"disabled_by_user_id" TEXT,
"leave_request" TEXT,
"two_factor_required" INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY ("organization_id", "user_id")
);