Skip to content

app.recent_views

TableRow level security on

What a person opened (Section 11.7: the last 50 records each person viewed appear before they type): each record, incident, document, SOP or handbook article once, with when they last opened it. At most 50 per person and org; rows go after 90 days and when the person is deleted. Only the person reads or writes their own rows.

Primary key: id

Columns of app.recent_views
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
person_iduuidNoPerson who opened it; always the signed-in person.References app.people.id
subject_tabletextNoTable of what was opened: records, incidents, documents, sops or handbook_articles.
subject_iduuidNoRow that was opened.
viewed_attimestamp with time zoneNoWhen the person last opened it, set by the database.
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
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.