auth/account_queries.ts view source
readonly ["id", "username", "email", "email_verified", "password_hash", "created_at", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by"] import {ACCOUNT_COLUMNS} from '@fuzdev/fuz_app/auth/account_queries.js'; The full account column set, named explicitly so a row read fails loud
on schema drift.
SELECT * silently omits a dropped column, which the login lookups then
misread: query_account_by_username_or_email filters its result with
account.deleted_at === null, so a missing deleted_at column reads back
as undefined, undefined === null is false, and *every* login resolves
to "not found" (401) — a silent, total auth outage instead of an error.
Selecting named columns turns that drift into a hard Postgres
column "..." does not exist. Mirrors the Rust side
(fuz_auth/src/account_queries.rs), which selects named columns and
decodes them positionally. Keep in sync with Account and the account
DDL in auth/auth_ddl.ts.