Diagrams and comparisons
A schema drawn as boxes and the foreign keys between them; two schemas, or the rows of two tables, laid side by side to show where they differ.
The diagram of a schema
Right-click a schema in the tree and choose Show the diagram of this schema, or use Diagram of the selected schema in the Tools menu. A tab opens with one box per table, each column with its type and a key beside the primary key’s, and one line for every foreign key the server records. A table in another schema that a key points to is drawn as a small box of its own. A schema with up to 200 tables is drawn; a larger one is refused rather than drawn unreadably.
Drag to move about, turn the wheel to zoom, and double-click the background to go back to the whole. A double-click on a box opens that table’s rows. Export saves the drawing as an SVG file.
Comparing two schemas
Right-click a schema and choose Compare this schema with another, then the connection and the schema to set beside it, and Compare. The other may be on another connection. The list says, for each difference, What it is, its Name and the Difference: a table, column, index or constraint on one side only, or a column whose type, nullability, default or position differs. Read again compares afresh.
NoteOnly relations, their columns, their indexes and their constraints are read. Triggers, routines, grants, sequences and comments are not, so two schemas differing only in those compare as identical. Two schemas that differ in more than 5000 places are refused rather than listed.
Build a script writes the statements that would make the right-hand schema look like the left, its first line -- right ← left, with Copy beside it. It runs nothing: read it, then run it in a console. A table that is only on the right is named in a comment and not dropped for you, and a change the script cannot write is listed under Not in the script. The statements are written for PostgreSQL, so the right-hand side should be one.
Comparing two tables’ rows
Right-click a table and choose Compare rows with…, then the connection, schema and table on the other side, and Compare. Rows are lined up by the table’s key, and each difference is a row of Key, Column, Left and Right, a row present on one side only included. Without a key nothing can be lined up, and a key that repeats on either side is refused rather than guessed at. More than 5000 differences are refused too.