Adventure Labs Logo
Scout Docs

Points_for_user

User performance points ledger

Column NameData TypeConstraints
idbigintNOT NULL
pointsintegerNOT NULL
inserted_attimestamp with time zoneDEFAULT timezone('utc'::text, now()) NOT NULL
user_iduuidNOT NULL
update_reasontextNOT NULL

Balance for a user is sum(points) where user_id matches. Each row is a signed delta (positive or negative), not an absolute balance. Rows cascade-delete when the user is deleted.

Security Policies (RLS)

RLS enabled. Herd scope: Not herd-scoped.

Operationhas_herd_ability ability keyOther paths
SELECT—Row owner (user_id = auth.uid()); platform superadmin
INSERT—Platform superadmin only
UPDATE—Platform superadmin only
DELETE—Platform superadmin only

On this page