Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| record_id | text | 2147483647 | null |
|
|
{“what”:“Unique opaque key for this version row.”,“why”:“Without it, rows cannot be uniquely referenced for updates or joins.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.865443233+00:00”} |
|||||||||||||||||
| user_id | text | 2147483647 | null |
|
|
{“what”:“Stable identifier for the user across all versions.”,“why”:“Without it, versions of the same user cannot be grouped.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.885839915+00:00”} |
|||||||||||||||||
| version | int4 | 10 | 1 |
|
|
{“what”:“Monotonic version number for this user, starting at 1.”,“why”:“Without it, ordering of versions and detecting the latest is impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.905302084+00:00”} |
|||||||||||||||||
| is_current | bool | 1 | true |
|
|
{“what”:“True if this row is the latest version of the user.”,“why”:“Without it, the current user record cannot be distinguished from historical ones.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.933069235+00:00”} |
|||||||||||||||||
| superseded_by | text | 2147483647 | √ | null |
|
|
{“what”:“record_id of the version that replaced this one; null if current.”,“why”:“Without it, the chain of version replacements is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.954418975+00:00”} |
||||||||||||||||
| text | 2147483647 | null |
|
|
{“what”:“Login email address for the user.”,“why”:“Without it, user cannot authenticate or be contacted.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.971375143+00:00”} |
||||||||||||||||||
| display_name | text | 2147483647 | null |
|
|
{“what”:“Human-readable name shown in UI.”,“why”:“Without it, no friendly label for the user.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:15.990193694+00:00”} |
|||||||||||||||||
| password_hash | text | 2147483647 | null |
|
|
{“what”:“Hashed password for authentication.”,“why”:“Without it, password-based login is impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.005911319+00:00”} |
|||||||||||||||||
| totp_secret | text | 2147483647 | √ | null |
|
|
{“what”:“Base32-encoded secret for TOTP two-factor authentication; null if not set.”,“why”:“Without it, TOTP 2FA cannot be verified.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.019148565+00:00”} |
||||||||||||||||
| totp_enabled | bool | 1 | false |
|
|
{“what”:“True if TOTP two-factor authentication is active for this user.”,“why”:“Without it, login flow cannot decide whether to require a TOTP code.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.036624580+00:00”} |
|||||||||||||||||
| role | text | 2147483647 | 'user'::text |
|
|
{“what”:“Access role, e.g., ‘user’ or ‘admin’.”,“why”:“Without it, authorization decisions cannot be made.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.057643992+00:00”} |
|||||||||||||||||
| created_at | timestamptz | 35,6 | now() |
|
|
{“what”:“Timestamp when this version row was inserted.”,“why”:“Without it, version creation time is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.070021273+00:00”} |
|||||||||||||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
{“what”:“Timestamp of last update to this version row; equals created_at if never modified.”,“why”:“Without it, staleness of the version cannot be assessed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.080060027+00:00”} |
|||||||||||||||||
| change_reason | text | 2147483647 | √ | null |
|
|
{“what”:“Free-text reason for creating this version, e.g., ‘email change’.”,“why”:“Without it, audit trail lacks context for why a version was created.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:00:16.102232584+00:00”} |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| users_pkey | Primary key | Asc | record_id |
| idx_users_current | Performance | Asc | user_id |
| idx_users_email | Performance | Asc | |
| idx_users_uid_ver | Must be unique | Asc/Asc | user_id + version |