Skip to content

app.approval_policies

TableRow level security on

Approval policies (Section 4.10 workflow engine): ordered approval steps a spend document passes before its own approval RPC accepts it. Keyed by document type; one Active policy per type per org.

Primary key: id

Columns of app.approval_policies
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
nametextNoPolicy name.
descriptiontextYesWhat the policy is for, shown to requesters and approvers.
document_typeapp.spend_document_typeNoSpend document type the policy gates. Contract (settlement rounds) is not gated by policies.
currency_codecharacter(3)YesISO 4217 currency of applies_above_minor; NULL when the policy applies to every document.References private.currencies.currency_code
applies_above_minorbigintYesThe policy applies to documents above this amount in currency_code (and to documents in any other currency); NULL for every document of the type.
policy_stateapp.approval_policy_stateNoDraft, Active or Retired. Changes only through app.transition_approval_policy.
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id