email_changes


Description

{“what”:“Audit log of email address changes per user.”,“why”:“Without it, no history of email updates exists for security review or rollback.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.335636977+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
record_id text 2147483647 null

{“what”:“Unique identifier for each change event; primary key.”,“why”:“Ensures each change row is addressable and deduplicable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.347897831+00:00”}

user_id text 2147483647 null

{“what”:“Identifier of the user whose email was changed.”,“why”:“Links the change to the user account; without it, changes cannot be attributed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.358428616+00:00”}

request_id text 2147483647 √ null
email_change_requests.record_id email_changes_request_id_fkey R

{“what”:“Optional identifier of the originating request or workflow.”,“why”:“Correlates the change to a specific action or batch; without it, provenance is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.377536379+00:00”}

old_email text 2147483647 null

{“what”:“Email address before the change.”,“why”:“Needed to verify previous contact and to support revert or audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.404360448+00:00”}

new_email text 2147483647 null

{“what”:“Email address after the change.”,“why”:“Records the new value; without it, the change is meaningless.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.423241264+00:00”}

old_user_record text 2147483647 √ null
users.record_id email_changes_old_user_record_fkey R

{“what”:“Snapshot of the user record before the change, if captured.”,“why”:“Preserves prior state for rollback or comparison; without it, only email is known.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.437067344+00:00”}

new_user_record text 2147483647 √ null
users.record_id email_changes_new_user_record_fkey R

{“what”:“Snapshot of the user record after the change, if captured.”,“why”:“Captures post-change state for audit or restoration; without it, later state is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.462552642+00:00”}

changed_at timestamptz 35,6 now()

{“what”:“Timestamp when the change was recorded, defaulting to now.”,“why”:“Provides chronological order and audit timeline; without it, sequence is ambiguous.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.478959356+00:00”}

changed_by text 2147483647 null

{“what”:“Identifier of the actor who performed the change.”,“why”:“Attributes responsibility; without it, accountability is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:58.498182386+00:00”}

Indexes

Constraint Name Type Sort Column(s)
email_changes_pkey Primary key Asc record_id

Relationships