This page describes Calíope 1.5, the version we are building right now. 1.4 is finished and in App Review, and the store serves 1.3 on the Mac and 1.2 on iPad. The changelog says which version each feature landed in.

Adds an “Open in Calíope” button to every topic. It only works with the app installed.

ER Diagram

Generate ER Diagram

Visualize the relationships between tables in a database.

Where it is: Workspace › Tools › ER

Open the ER Diagram from the workspace navigation bar. Select the database in the top selector and Calíope will load the tables with their columns and existing foreign key relationships.

The diagram displays tables as nodes with columns and data types. Lines between tables represent the foreign keys detected on the server.

Keywords: ER, entity relationship, diagram, FK, foreign key, relationships, ERD

Navigating the diagram (zoom and pan)

Zoom in, zoom out, and scroll the diagram view.

Where it is: ER Diagram › Canvas

Zooming in and out — on macOS, the mouse wheel, a two-finger pinch on the trackpad, or the toolbar buttons; on iPad, the pinch or those same buttons. The percentage between the toolbar's and + shows the current scale, and the shortcuts are ⌘−, ⌘+ and ⌘0. The limits are the same on all three: 18 % to 400 %, and the button dims once you reach either end.

Panning the canvas — drag over an empty area, on all three. Over a node, dragging moves the table instead.

Getting the whole diagram back — the Fit to window button (⌘0) frames every table. The diagram also re-fits itself when it opens and when the window is resized.

The Auto layout button rearranges the nodes to minimize overlaps.

Keywords: zoom, pan, scroll, zoom in, zoom out, canvas, navigate

Creating an FK relationship in the diagram

Draw a new foreign key relationship between two tables.

Where it is: ER Diagram › right-click › Create FK relationship

Open the context menu on a table — right-click on macOS, press and hold on iPad — and select New FK relation…. A dialog opens to choose the source table and column, and the target table and column. When confirmed, Calíope executes the ALTER TABLE … ADD FOREIGN KEY on the server.

On macOS only, in addition: hold ⌃ (Control) and drag from one table to the target one; a rubber-band line follows the gesture and releasing opens that same dialog. On iPad the gesture does not exist, and the foreign key is created from the context menu.

Keywords: FK, foreign key, create relationship, ALTER TABLE, referential integrity

Saving the diagram layout

Persist node positions to keep your arrangement between sessions.

Where it is: ER Diagram › Save layout

Click the Save layout button in the ER Diagram toolbar. The current positions of all table nodes are saved in UserDefaults under the key caliope_er_layout_v1.

The next time you open the diagram for the same database, the nodes will be restored to their saved positions. If no layout is saved, the diagram applies auto-layout automatically.

Keywords: layout, position, save, persist, nodes, arrangement, UserDefaults

Exporting the ER diagram

Save the diagram as SVG or PDF.

Where it is: ER Diagram › Export SVG / PDF

In the ER Diagram toolbar, the export button offers two formats: SVG (vector, editable with Illustrator or Inkscape) and PDF (ready for printing or presentation). The file is saved to the location you choose using the system dialog.

Keywords: export, SVG, PDF, save, print, diagram, vector

View DDL from the diagram

Inspect the full structure of a table directly from the diagram.

Where it is: ER Diagram › right-click › Edit table structure

Open the context menu on a table node in the diagram — right-click on macOS, press and hold on iPad — and select Edit table structure. A panel opens showing the complete CREATE TABLE statement for the selected table.

Keywords: DDL, CREATE TABLE, structure, view table, show create, table definition

Compare database schemas

Compare two databases on the same server — tables, views, routines, triggers and events — and generate the migration script.

Where it is: Workspace › Tools › Diff

The Schema Diff tool analyzes two databases on the same server and shows exactly what changed across tables, views, procedures, functions, triggers and events.

Opening Schema Diff:
Click Diff (opposing arrows icon) in the Tools sidebar. It opens in a new tab.

Basic use:
1. Pick the source DB and the target DB in the pickers on the top bar.
2. Click Compare. Calíope reads each object's SHOW CREATE … on both databases — the canonical definition written by the server itself.
3. Turn on the Only changes toggle to hide what matches.
4. The report is grouped by object type. Expand any row: a modified table shows, change by change, the definition it has and the one it will get; a modified view or routine shows both full definitions side by side; a new or dropped object shows its DDL.
5. Click Copy SQL for the whole script, or a row's copy button for that object alone.

What it generates for tables:
- A full CREATE TABLE IF NOT EXISTS for those missing from the source, with columns, indexes and options.
- DROP TABLE IF EXISTS for the ones left over.
- ALTER TABLE with ADD/DROP/MODIFY COLUMN, preserving type, nullability, default value, comment, character set and generated-column expression.
- Added and dropped primary keys, indexes and CHECK constraints, plus table option changes (ENGINE, DEFAULT CHARSET, COLLATE, ROW_FORMAT, COMMENT).

What it generates for everything else:
A view or a routine cannot be patched piecemeal: if its definition differs, the script rebuilds it (DROP + CREATE) from the target, rewriting the references to the source schema so it points at the right database.

Script order:
Tables first; then foreign keys in their own block, because when several tables are created alphabetical order does not respect dependencies; then a USE and the remaining objects by type, each type ordered by dependencies — a view built on another is emitted after it.

Ignored on purpose:
The AUTO_INCREMENT counter, which advances with every insert and never matches between two copies.

What it does not cover:
A partitioning change is detected and noted as a warning but never turned into SQL: repartitioning rewrites the whole table. Columns of an existing table are not reordered, and a renamed column reads as a drop plus an add. Views, routines, triggers and events are compared textually, so a mere formatting or DEFINER change counts as a difference — and on MariaDB a trigger's DDL is the literal text it was written with. An event with a different start time also differs, because that time is part of its definition.

Always review the script before running it in production.

Typical use case:
Compare the development schema (source) against production (target) before a deployment to generate the migration script without writing it by hand.

Available on macOS, iPad and iPhone.

Keywords: schema diff, compare, schema, alter table, migration, differences, ADD COLUMN, DROP COLUMN, MODIFY COLUMN, SHOW CREATE TABLE, CREATE TABLE, indexes, foreign keys, partitioning, changes only

Multi-database ERD: visualize cross-database relationships

Add a second database to the ER diagram canvas to visualize relationships across databases.

Where it is: ER Diagram › + DB

The ER Diagram can display tables from two databases simultaneously on the same canvas, including foreign keys that cross from one database to the other.

How to add a second database:
1. With the ER Diagram open, select the primary DB in the left selector of the toolbar.
2. Click the + DB button in the toolbar to add a second database.
3. Select the second DB in the new selector that appears.
4. The canvas updates automatically, showing the tables of both databases.

Color coding:
- Blue header — tables from the primary DB.
- Teal header — tables from the second DB.
- Orange arrows — foreign key relationships that cross from one database to the other.
- Regular arrows — relationships within the same database.

Requirement for cross-database relationships:
Foreign keys must be declared in information_schema. MySQL/MariaDB records FKs in information_schema.KEY_COLUMN_USAGE. If cross-database relationships do not appear, verify that the FKs exist formally on the server (not just as naming conventions).

Navigation and export:
All features of the standard ER diagram apply to the multi-database canvas: zoom, pan, auto-layout, save layout, export SVG/PDF, and view table DDL. See the ER Diagram topics for more details.

Available on macOS, iPad and iPhone.

Keywords: erd, multi-database, cross-database, relationships, second database, foreign key, diagram, multi-db, blue header, teal header, orange arrows