organization_read_model_group_members Client SQLite table
Direct users bound to the exact state of their group's membership head. Public keys are not repeated here; the directory lane holds them per user.
Declared in packages/client-sdk/src/data/sqlite/schema/organizationReadModelSchema.ts
Columns
organization_idtext- not null
Organization that owns the group.
group_idtext- not null
Group the user directly belongs to.
user_idtext- not null
Member user.
sort_orderinteger- not null
Zero-based position in the group's served member list.
state_hashtext- not null
State hash of the membership head the row was delivered with; it must match the head bound for the group.
roletext- not null
Member's role in the group:
memberoradmin.
Keys and constraints
- Primary key
(organization_id, group_id, user_id)
DDL
The statements the client runs to create this table and its indexes.
CREATE TABLE IF NOT EXISTS "organization_read_model_group_members" (
"organization_id" TEXT NOT NULL,
"group_id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"sort_order" INTEGER NOT NULL,
"state_hash" TEXT NOT NULL,
"role" TEXT NOT NULL,
PRIMARY KEY ("organization_id", "group_id", "user_id")
);