email_change_requests


Description

{“what”:“Requests to change a user’s email address, each with a verification token.”,“why”:“Without it, email changes could not be tracked or verified.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.361319674+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
record_id text 2147483647 null
email_changes.request_id email_changes_request_id_fkey R

{“what”:“Unique identifier for this request, e.g. UUID.”,“why”:“Without it, requests cannot be referenced or updated uniquely.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.395098715+00:00”}

user_id text 2147483647 null

{“what”:“Identifier of the user requesting the email change.”,“why”:“Without it, the request cannot be linked to an account.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.419626865+00:00”}

old_email text 2147483647 null

{“what”:“Current email address that will be replaced.”,“why”:“Without it, the previous address is unknown after change.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.472528353+00:00”}

new_email text 2147483647 null

{“what”:“Proposed new email address to switch to.”,“why”:“Without it, the target address is unknown and cannot be verified.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.520464790+00:00”}

status text 2147483647 'pending'::text

{“what”:“Current state: pending, confirmed, or expired.”,“why”:“Without it, the request’s lifecycle stage is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.540518897+00:00”}

token_hash text 2147483647 null
oauth_refresh_tokens.token_hash Implied Constraint R

{“what”:“Hashed verification token sent to new email.”,“why”:“Without it, the confirmation link cannot be validated.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.571553085+00:00”}

requested_at timestamptz 35,6 now()

{“what”:“Timestamp when the request was created.”,“why”:“Without it, request age and expiry cannot be computed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.608389651+00:00”}

confirmed_at timestamptz 35,6 √ null

{“what”:“Timestamp when the user confirmed the new email.”,“why”:“Without it, confirmation status and timing are unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.645701499+00:00”}

expired_at timestamptz 35,6 √ null

{“what”:“Timestamp when the request was marked expired.”,“why”:“Without it, the actual expiration time is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.672290730+00:00”}

expires_at timestamptz 35,6 null

{“what”:“Deadline by which the request must be confirmed.”,“why”:“Without it, the request cannot be automatically expired.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:11.715852629+00:00”}

Indexes

Constraint Name Type Sort Column(s)
email_change_requests_pkey Primary key Asc record_id
idx_ecr_user Performance Asc/Desc user_id + requested_at

Relationships