schemabrain check
Probes the live source Postgres and compares its current schema to the snapshot in the local store. Surfaces three kinds of drift:
- Tables that were indexed but no longer exist.
- Columns that were indexed but no longer exist.
- Type / nullability changes on existing columns.
schemabrain diff.
Flags
When to run it
- After any database migration.
- On a schedule, paired with an alert when the JSON output reports non-empty drift.
- Before running
schemabrain servein a long-lived environment.
check reports drift, re-run schemabrain index --url-env DATABASE_URL --store-path ./schemabrain.db to refresh the snapshot. Indexing is idempotent and only re-enriches changed columns.
Examples
Default human report
CI-friendly JSON
Refresh after detecting drift
Related
schemabrain index
Refresh the snapshot after
check reports drift.schemabrain diff
The orthogonal drift question — project tree vs store.
schemabrain doctor
Broader health check covering host config + store.
schemabrain inspect
Browse the indexed schema without re-probing the source.