Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ERD plugin manual

Paweł Salawa edited this page May 8, 2026 · 32 revisions

Entity-Relation Diagram

This plugin, introduced in Letos 4.0.0, enables the application to visualize database schema as entities (tables) and relations (foreign keys). It also allows to edit the schema in the same (visual) manner.

[画像:image]

To open ERD editor for certain database, have a database (or any object inside that database) highlighted on the databases list. Then hit the ERD editor button on toolbar:

[画像:image]

If you don't have button with this icon on your toolbar, check if you have the ERD plugin loaded into Letos (go to Configuration window, then to Plugins section).

ERD? This is not ERD! How dare you?!

This editor is not a full-fledged ERD editor in the strict sense. A complete ERD typically includes additional semantic information, such as relationship cardinality (one-to-one, one-to-many), optionality, and other modeling details.

Here, the diagram provides a simplified, ERD-like view focused on practical schema editing: defining tables and managing relationships (foreign keys) between them in a visual way.

Usage

Navigating and editing the diagram

  • Hold the Spacebar and drag with the mouse to pan the diagram without selecting items. This behavior can be configured so that holding the Spacebar alone is sufficient.
  • Use the mouse wheel to zoom in and out.
  • Press T or use the toolbar button, then click on the diagram to create a new table at the selected position. While in this mode, hold Shift while clicking to continue creating multiple tables.
  • Press F or use the toolbar button, or click the middle mouse button on a table column and then click on another column to create a foreign key relationship.
  • Press Esc or click the right mouse button to cancel table creation or abort foreign key dragging.
  • Select a table or a foreign key line to edit its properties in the right-side panel.
  • Deselect the table (or click Commit in the side panel toolbar) to apply the side panel changes to the diagram.
  • Press Esc (or click Rollback in the side panel toolbar) to discard the side panel changes.
  • Press the Delete key to remove selected tables (DROP TABLE) or relations (ALTER TABLE).
  • Double-Click on a table name or column to edit the name inline.
  • Shift-Double-Click on a column to edit column details (datatype, constraints).
  • Double-Click a foreign key line to visually change its destination.
  • Alt+Click and drag a table to create a copy and move it.
  • Use Ctrl+F (Cmd+F on macOS) to search for a table by its name or by a column name.
  • Press F5 to discard all pending changes and reload the schema from the current database state. You will be asked for confirmation if there are uncommitted changes.

Applying or discarding changes

  • All diagram changes remain pending until you explicitly commit or revert them using the toolbar buttons in the top-left corner of the diagram.
[画像:image]
  • The Revert button on the toolbar reverts the diagram to its initial state while preserving the undo/redo history, allowing all reverted changes to be restored using redo.
  • The Reload Schema button discards all uncommitted changes, clears the undo/redo history, and reloads the schema from the database, updating it to reflect any changes made outside the ERD editor.
  • Use Ctrl+Z (Cmd+Z on macOS) to undo the last change in the diagram.
  • Use Ctrl+Shift+Z or Ctrl+Y (only on Windows) or Cmd+Shift+Z (on macOS) to redo previously undone changes.
  • You can review all pending changes by clicking the pending changes counter next to the Commit and Revert buttons on the toolbar.
  • In the Pending Changes review dialog you can use "Show effective changes only" option to see actual changes that will be committed to the database (redundant or mutually cancelling steps are merged or removed from the list). If that option is disabled you will see a full undo/redo list.
  • Committing pending changes is an atomic operation — it either succeeds completely or fails without applying any changes.
  • If the database schema is modified outside of the ERD editor while changes are pending, the commit operation may fail if the external changes are incompatible.

Other operations

  • Use Ctrl+1, Ctrl+2, and Ctrl+3 (Cmd+... on macOS) to switch between the three foreign key line styles: straight, curved, and orthogonal.
  • Your custom arrangement of tables is automatically saved and restored the next time you open the ERD editor for the same database.
  • You can assign a custom color to the selected table(s) using the toolbar or context menu color picker.

Custom table colors have no effect on the database schema. They are purely visual and can be used to improve diagram readability, for example by grouping tables by business domain.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /