Skip to main content

Guide: reading the schema in dev

Useful queries to explore tables, FKs, and indexes locally.
1 min read

List tables#

Columns of a table#

Foreign keys#

Indexes#

Soft-deleted count#

Dual users check#

Tips#

  • Use the postgres database in the connection string.
  • Prefer queries filtered by profile_id.
  • Do not touch Better Auth tables from ad-hoc SQL in prod.