Tearleads

pending_personal_org_rotations Client SQLite table

A personal-organization key rotation still owed after this install removed a device: one row per identity, cleared once a rotation reaches the target. A later removal only raises the target, so an older failure never lowers a newer one.

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

Columns

  • identity_trust_domaintext
    • not null

    The identity the rotation is owed for.

  • user_idtext
    • not null

    The identity the rotation is owed for.

  • target_key_epochinteger
    • not null

    The key epoch the personal organization's keys must be rotated to, at least.

  • updated_attext
    • not null

    When the target was last recorded.

Keys and constraints

  • Primary key(identity_trust_domain, user_id)

DDL

The statements the client runs to create this table and its indexes.

CREATE TABLE IF NOT EXISTS "pending_personal_org_rotations" (
  "identity_trust_domain" TEXT NOT NULL,
  "user_id" TEXT NOT NULL,
  "target_key_epoch" INTEGER NOT NULL,
  "updated_at" TEXT NOT NULL,
  PRIMARY KEY ("identity_trust_domain", "user_id")
);