Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | null |
|
|
{“what”:“UUID primary key, unique identifier for each token record.”,“why”:“Provides a stable reference for token rows in joins and updates.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.274176607+00:00”} |
|||||
| user_id | uuid | 2147483647 | null |
|
|
{“what”:“UUID of the user account that owns this token.”,“why”:“Links tokens to users so access can be revoked or audited per user.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.286526823+00:00”} |
|||||
| token | bytea | 2147483647 | null |
|
|
{“what”:“Binary token value, likely hashed or encrypted, used for authentication.”,“why”:“Stores the secret credential that must be verified on each request.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.297495696+00:00”} |
|||||
| context | varchar | 255 | null |
|
|
{“what”:“String describing the token’s purpose, e.g., ‘password_reset’ or ‘api’.”,“why”:“Distinguishes token types so different flows can be validated separately.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.311390533+00:00”} |
|||||
| sent_to | varchar | 255 | √ | null |
|
|
{“what”:“Email address or phone number the token was delivered to; nullable.”,“why”:“Records the delivery target for audit or to resend if needed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.321870268+00:00”} |
||||
| created_at | timestamp | 29,6 | null |
|
|
{“what”:“Timestamp (without time zone) when the token was issued.”,“why”:“Enables expiry checks and cleanup of stale tokens.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:01:24.334203204+00:00”} |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| user_tokens_pkey | Primary key | Asc | id |
| user_tokens_context_token_index | Must be unique | Asc/Asc | context + token |
| user_tokens_user_id_index | Performance | Asc | user_id |