-
-
Notifications
You must be signed in to change notification settings - Fork 653
ERD plugin manual
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).
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.
- 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 wheelto zoom in and out. - Press
Tor use the toolbar button, then click on the diagram to create a new table at the selected position. While in this mode, holdShiftwhile clicking to continue creating multiple tables. - Press
For use the toolbar button, or click themiddle mouse buttonon a table column and then click on another column to create a foreign key relationship. - Press
Escor click theright mouse buttonto 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
Deletekey to remove selected tables (DROP TABLE) or relations (ALTER TABLE). -
Double-Clickon a table name or column to edit the name inline. -
Shift-Double-Clickon a column to edit column details (datatype, constraints). -
Double-Clicka foreign key line to visually change its destination. -
Alt+Clickand drag a table to create a copy and move it. - Use
Ctrl+F(Cmd+Fon macOS) to search for a table by its name or by a column name. - Press
F5to discard all pending changes and reload the schema from the current database state. You will be asked for confirmation if there are uncommitted 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.
- The
Revertbutton 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 Schemabutton 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+Zon macOS) to undo the last change in the diagram. - Use
Ctrl+Shift+ZorCtrl+Y(only on Windows) orCmd+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.
- Use
Ctrl+1,Ctrl+2, andCtrl+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.