Tearleads

organization_read_model_requesters Client SQLite table

Requester-scoped fields that must not become organization-global state.

Declared in packages/client-sdk/src/data/sqlite/schema/organizationReadModelSchema.ts

Columns

  • organization_idtext
    • not null

    Organization the requester read.

  • user_idtext
    • not null

    Local user whose responses this row tracks. Applying a directory lane prunes the rows of other users it no longer lists as active.

  • is_org_admininteger
    • not null

    Whether the last applied response reported the user as an organization admin.

  • applied_cursortext
    • not null

    The response cursor this requester last applied. The organization row's cursor proves only that some requester applied shared lanes.

  • updated_attext
    • not null

    ISO-8601 time this device last applied a response for the user.

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_requesters" (
  "organization_id" TEXT NOT NULL,
  "user_id" TEXT NOT NULL,
  "is_org_admin" INTEGER NOT NULL,
  "applied_cursor" TEXT NOT NULL,
  "updated_at" TEXT NOT NULL,
  PRIMARY KEY ("organization_id", "user_id")
);