Skip to content

basalt / auth-sqlite/src / normalizeAuthUserEmails

Function: normalizeAuthUserEmails() ​

> normalizeAuthUserEmails(db, options?): NormalizeEmailsReport

Defined in: auth-sqlite/src/index.ts:667

One-off migration for users written before emails were canonicalised (trimmed, lowercased): rewrites every non-canonical email with no case-variant twin, reports the twins, and — when none are left — builds the case-insensitive unique index migrate() had to skip. Idempotent; runs in one transaction. dryRun: true only reports.

Parameters ​

db ​

DatabaseSync

options? ​

dryRun? ​

boolean

Returns ​

NormalizeEmailsReport

Released under the MIT License.