Documentation
DB Compare
Compare schemas and indexes between two connections. Visual diff with breaking-change highlighting. Wire as a PR gate so structural drift between dev / staging / production is caught before deploy.
What it is
A workspace tab that compares the schema + indexes of two connections side by side. The engine reads collection lists, sample documents (for schema inference), and `db.collection.getIndexes()` from each side, then renders a structural diff with breaking-change markers (e.g. removed fields, type narrowing, dropped indexes).
When to use
Run before a release to confirm dev / staging matches production. Run as a PR gate so structural drift cannot land without review. Run during incident response to verify a misbehaving cluster did not lose an index.
How to open
- In the NoSqlStudio desktop app, open the Tools menu → Migrate and Diff → Compare DBs, or press Ctrl+Alt+Shift+C.
- A workspace opens with source / target pickers and a Run Compare button.
- Pick two connections + the databases to compare, then click Run Compare.
Reading the diff
- Schema column — fields present on one side and not the other, type mismatches, and required-field changes.
- Indexes column — indexes present on one side, indexes with different specs, indexes that should be unique but are not.
- Breaking changes — items the engine flags as likely to cause runtime failures are highlighted in red and listed first.
- Export — the engine exports the diff as JSON or CSV for attaching to a ticket. The Schema Diff workspace consumes the same diff format to emit a migration script.
Limitations (v1)
- Schema inference is sample-based — same caveat as Schema Diff. Set the sample size to cover representative documents.
- Comparing huge collections at full sample size is slow. The wizard defaults to a 1000-doc sample; bump it only when you specifically need full coverage.
- Compare reads — it does not modify either cluster. Use Schema Diff or DB Copy to actually reconcile.