app.records
TableRow level security on
One table for all 26 record kinds (Bible tab 24, Section 3.10). Kind attributes live in 1:1 extension tables. A record is readable by its project's members and the people assigned to it, not the whole org (invariant 2). Canceled records are retained, never deleted.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.References app.organizations.id |
| project_id | uuid | No | Project the record belongs to. Never changes.References app.projects.id |
| scope_node_id | uuid | Yes | Scope node of the same project the record sits under.References app.scope_nodes.id |
| record_number | bigint | No | Sequence number within the project, issued by private.next_sequence on insert. The display key is {project_key}-{record_number}, read through app.record_display_key. |
| record_kind | text | No | One of the 26 canon record kinds. Never changes after insert.References xpms.dim_record_subtype.record_kind |
| record_subtype | text | Yes | Kind-scoped subtype (Bible tab 25). The composite foreign key with record_kind refuses a subtype of another kind.References xpms.dim_record_subtype.record_subtype |
| record_state | text | No | One of the nine record states (Bible tab 26). Changes only through app.transition_record.References xpms.dim_record_state.record_state |
| title | text | No | Title in the kind's title grammar, validated on write with a correction message. |
| phase_code | text | Yes | Gated phase the record belongs to.References xpms.dim_phase.phase_code |
| urid | text | Yes | URID category the record works on (dimension 2).References xpms.dim_category.cat_urid |
| xyz | xpms.xyz_tag | No | XYZ schema-family tag: X Resource, Y Process, Z Timeline. |
| xyz_basis | app.xyz_basis | No | Basis of the XYZ tag: Category (equals the URID category's tag) or Declared. |
| owner_party_id | uuid | Yes | Person who owns the record and does the work.References app.people.id |
| accountable_party_id | uuid | Yes | Person accountable for the record's outcome.References app.people.id |
| starts_at | timestamp with time zone | Yes | Start of the record's window. |
| ends_at | timestamp with time zone | Yes | End of the record's window; not before starts_at. |
| due_at | timestamp with time zone | Yes | When the record is due. |
| time_zone | text | Yes | IANA zone the record's local times were typed in; NULL means the project's zone. |
| blocker_text | text | Yes | What blocks the record. Required while the record is Blocked. |
| replan_reason | text | Yes | Why the record was replanned. Required while the record is Deferred. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| 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 |
| parent_record_id | uuid | Yes | Summary record this record rolls up to, in the same project (work breakdown).References app.records.id |
| wbs_code | text | Yes | Work breakdown structure code, dot separated (1.2.1). |
| description | text | Yes | What the record involves, in sentence case. |
| sop_id | uuid | Yes | Standard operating procedure that governs the work.References app.sops.id |
| team_code | text | Yes | Canon team (Bible teams) that does the work.References xpms.dim_team.team_id |