app.sync_mutations
TableRow level security on
Append-only replay ledger of mutations applied for offline devices (Section 13). The id is the client mutation id: a replay returns the stored result and never runs the RPC twice. Each person reads only their own rows; rows are written only by app.apply_sync_mutation.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Client-generated mutation id, unique across every device and person. |
| org_id | uuid | No | Org the mutation acted in.References app.organizations.id |
| person_id | uuid | No | Person whose device sent the mutation.References app.people.id |
| device_id | text | No | Device identifier the client reports. |
| rpc | text | No | RPC that was called.References private.sync_rpcs.rpc |
| applied_at | timestamp with time zone | No | When the mutation was first applied. |
| result | jsonb | No | Stored result returned to every replay: {"data": ...} on success or {"refusal": {"rule", "message"}} when refused. A provider payload for the client, an allowed JSON column. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |