Skip to main content
Use fingerprint when you need a fast equality check for a schema source. Matching fingerprints mean the modeled schema objects are equal, ignoring SQL formatting and comments.

Use this when

  • A script needs a compact drift signal.
  • You want to compare a tree and database after deploy.
  • Two schema spellings should normalize to the same model.
  • Debugging requires the model hash only.

Run it

npx supaschema fingerprint --from dir:database/schemas
npx supaschema fingerprint --from "database:$DATABASE_URL"
Compare two sources in a shell:
[ "$(npx supaschema fingerprint --from dir:database/schemas)" = \
  "$(npx supaschema fingerprint --from "database:$DATABASE_URL")" ] \
  && echo "in sync" || echo "drift detected"

Flags

--from
source
Required schema source to fingerprint.

Exit codes

CodeMeaning
0Fingerprint printed
1Runtime failure
2Extraction diagnostics contained an error

Inspect

Print the model that produced the hash.

Verify

Compare fingerprints after apply-twice verification.

Diff

Render operations when fingerprints differ.

Sources

Choose source formats for comparisons.
Last modified on June 16, 2026