Skip to content

Schema compare

Schema compare/migration

You can compare two schemas/databases structure and generate report as: - DDL script (series of create/alter/drop statements) - Diff diagram (sort of ER diagram) - Liquibase change log - Liquibase change report (json, yaml or plaintext)

Selecting objects to compare

  • Select two objects (schemas, databases or tables) you want to compare
  • Open context menu
  • Open sub-menu Compare/Migrate
  • Click on Compare/Migrate Schema element

Compare settings

Re-validate that you chosen right objects to compare. You can also specify which changes to process: creates, drops, alters. By default all change types are enabled.

Also you can exclude the specific compared types of objects. For example, if you do not want to see in the final result comparison of sequences, views, external keys etc.

Compare results

Click on Compare Schemas to generate diff report.

By default DDL diff is generated. It contains series of create/alter/drop statements which will modify schema on the right side and thus will make it identical to the schema on the left side.

You can enable/disable particular changes in the tree on the left side of diff page:

You can also switch to another diff report representation (diagram, json, yaml, plaintext).

Compare schemaless bases

Some bases (like SQLite and Firebird) do not have catalogs and schemes that could be selected for comparison. In this case (and only for these databases), it is possible to compare the entire datasource entirely.