Skip to content

Export the ER diagram as SVG, PDF, Mermaid and Graphviz DOT #2519

Closed

Description

@datlechin

Problem

The ER diagram exports one format: Export as PNG, a bitmap at twice screen resolution, and Cmd+C copies the same image (features/er-diagram.mdx:69-73, apple/TablePro/Views/ERDiagram/ERDiagramView.swift:115-128).

A bitmap blurs when a document or slide scales it, its text cannot be searched, and it cannot be diffed or edited. A schema diagram meant for a README, a design document or a pull request needs a vector file, or a text format that renders where it lands: Mermaid renders in GitHub Markdown, and Graphviz DOT feeds documentation builds.

Proposed solution

  • The toolbar's export button becomes a menu: PNG (as today), SVG, PDF, Mermaid and Graphviz DOT, plus Copy as Mermaid for pasting into Markdown.
  • SVG and PDF are vector, drawn from the layout the window shows: saved node positions, header colors and crow's foot markers, with text kept as text. A PDF is one page sized to the diagram.
  • Mermaid writes an erDiagram block: each table with its columns, types and PK and FK markers, and each foreign key as a relationship carrying the cardinality the diagram already infers (features/er-diagram.mdx:29-34).
  • DOT writes each table as an HTML-like label with one row per column, and each foreign key as an edge between the two column ports, with Graphviz's crow, tee and odot arrowheads for the cardinality.
  • Every format exports what the view shows: compact mode and the junction table setting carry over, as they do into the PNG today.
  • The text formats list tables and columns in a stable order, so exporting an unchanged schema twice gives the same file and a diff shows only real changes.

Done when: for a 30-table schema, the SVG and PDF open in Preview and a browser, the Mermaid block renders in a GitHub comment, and dot -Tsvg renders the DOT file, each with every table and foreign key.

Alternatives considered

Export the PNG, or write the Mermaid or DOT by hand from File > Export > Export Tables… with SQL structure.

Platform

macOS

Related database type

N/A / General

Activity

  1. added
    enhancement
    on Aug 26, 2026
  2. changed the title [-]Export the ER diagram to Graphviz DOT[/-] [+]Export the ER diagram as SVG, PDF, Mermaid and Graphviz DOT[/+] on Oct 19, 2026
  3. added
    platform-macos
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions