CoachAccessRequestScopes table

The CoachAccessRequestScopes table in the FitStack - V2 schema has 6 columns, keyed by Id, with 2 foreign keys to CoachAccessRequests and DataScopes.

Line items of the ask.

Columns (6)

Columns of the CoachAccessRequestScopes table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
AccessRequestIduuidnot null, references CoachAccessRequests.IdCASCADE.
DataScopeIduuidnot null, references DataScopes.IdRESTRICT — a scope in use cannot be deleted, only deprecated.
RequestedHistoryWindowDaysintegerHow far back the coach is asking to see. Null = all history, subject to DataScopes.MaxHistoryWindowDays.
Justificationcharacter varying(1000)Per-scope reason. Required by the app for Sensitive scopes.
WasApprovedbooleanFilled at decision time. Null while pending. This is what makes PartiallyApproved auditable — you can see exactly which scopes were refused.

Indexes (1)

  • (AccessRequestId, DataScopeId) unique (IX_CoachAccessRequestScopes_RequestId_ScopeId)

Relationships