Schema Comparison
Compare database schemas across environments to identify differences in tables, columns, indexes, and constraints. Useful for verifying that a QA database matches Prod before a release.
Access
Navigate to Database > Compare in the sidebar or go to /database/compare.
Key Features
- Side-by-side visual diff of two database schemas
- Detects differences in tables, columns, data types, indexes, and constraints
- Highlights additions, removals, and modifications
- Select any two saved database connections as source and target
- Results can be used as input for the Migration Wizard
Usage
Running a Comparison
- Navigate to
/database/compare - Select a source connection (e.g. QA database)
- Select a target connection (e.g. Prod database)
- Click Compare
The comparison runs against both databases and produces a diff report.
Reading the Results
The diff is organized by table:
| Indicator | Meaning |
|---|---|
| Added | Table or column exists in source but not in target |
| Removed | Table or column exists in target but not in source |
| Modified | Column type, default, nullability, or constraint differs |
| Unchanged | No differences detected |
For each modified column, the old and new definitions are shown side by side.
Index and Constraint Diffs
Below the column diff, each table section shows differences in:
- Indexes — added, removed, or changed indexes
- Constraints — primary keys, foreign keys, unique constraints, check constraints
TIP
Run comparisons with read-only credentials. The compare operation only reads information_schema and does not modify any data.
API
POST /api/database/schema/compare # Compare two schemasRequest body:
json
{
"sourceConnectionId": 1,
"targetConnectionId": 2
}Managed by DatabaseSchemaController.