Database and Git comparison
Review schema drift and semantic changes before changing a database.
Compare with a Git revision#
Open a version-controlled DBML entry file and choose Compare with Git Revision…. Select the baseline revision, then review semantic additions, changes, and removals and their diagram highlights.
Try a small experiment: commit a schema, add a column with an unsaved editor change, and compare against that commit. The comparison includes current unsaved content and imported modules, so it can show work that is not committed yet. Save or revert deliberately before treating the result as a release comparison.
A moved table in the diagram is a layout change, not necessarily a schema change. Use the semantic result to distinguish structure from presentation.
Compare with a live database#
This workflow needs IntelliJ IDEA Ultimate or DataGrip with Database Tools:
- Configure the database as an IDE data source and complete introspection.
- Open the DBML entry file and choose Compare DBML with Database….
- Select the intended data source and schema.
- Review missing/extra tables, columns, types, indexes, and supported constraints.
- Refresh introspection and repeat after a database change.
Use a disposable database for practice. For example, compare a DBML numeric(12,2) amount with a changed database column and inspect the reported type difference. Driver-normalized type names or automatically created indexes may appear as dialect-specific differences.
Interpret the result#
A drift report explains what differs; it is not a migration plan. Decide whether DBML or the database is the intended baseline, then write and review the migration through your normal database workflow. Exported SQL DDL may create a schema and should not be assumed safe to apply directly to an existing database.
If a comparison looks stale, check the active entry module, unsaved edits, selected revision, selected database schema, and introspection status before modifying either side.
Manual for version 2026.2.4 · Reviewed