Skip to content

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

  1. Navigate to /database/compare
  2. Select a source connection (e.g. QA database)
  3. Select a target connection (e.g. Prod database)
  4. Click Compare

The comparison runs against both databases and produces a diff report.

Reading the Results

The diff is organized by table:

IndicatorMeaning
AddedTable or column exists in source but not in target
RemovedTable or column exists in target but not in source
ModifiedColumn type, default, nullability, or constraint differs
UnchangedNo 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 schemas

Request body:

json
{
  "sourceConnectionId": 1,
  "targetConnectionId": 2
}

Managed by DatabaseSchemaController.

Released under the MIT License.