You can compare two schema/database structures and generate a report in the following formats:
- 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 the two objects (schemas, databases, or tables) you want to compare
- Open the context menu
- Open the sub-menu
- Click on
Re-validate that you have chosen the correct objects to compare. You can also specify the types of changes to be processed: creates, drops, or alters. By default, all types of changes are enabled.
For comparisons, table containers should be used. Schemes - if the database supports the schemas. Databases - if the database supports catalogs and does not support the schemes. Datasources - if there is no support schemas, nor catalog support (you can find an example below in "Compare schemaless bases").
You can exclude the specific compared types of objects.
For example, you can do this if you do not want to see the sequences, views, or external keys in the final comparison result.
Compare Schemas to generate a diff report.
By default, DDL diff is generated. It contains a series of creating, alter and/or drop statements that will modify the schema on the right side. Thus it 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 the 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 can be selected for comparison. In this case (and only for these databases), it is possible to compare the entire datasource entirely.
Databases supporting schema comparison
- SAP HANA