Skip to main content

Export SQL (DDL)

EntityFlow turns your diagram into ready-to-run DDL. Click Export in the top bar and open the SQL tab.

Export dialog, SQL tab

Generate DDL​

  1. Choose a dialect: PostgreSQL, MySQL, MariaDB, SQL Server or SQLite.
  2. Optionally add a title — it's emitted as a leading SQL comment.
  3. Optionally exclude specific tables or groups using the checkboxes.
  4. Watch the live preview update, then Copy to the clipboard.

You can also use File → Export SQL → {dialect} for a one-click copy of the whole schema in a given dialect.

Dialect-correct output​

The preview is genuinely dialect-aware, not a find-and-replace:

ConcernHow it adapts
Quoting"...", backticks or [...] per engine
TypesMapped to each engine's native type
Auto-incrementSERIAL / IDENTITY / AUTO_INCREMENT / AUTOINCREMENT
EnumsNative ENUM where supported, otherwise a CHECK constraint
ConstraintsKeys and references rendered per dialect
-- Acme Storefront
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name varchar(255) NOT NULL,
category_id integer REFERENCES categories(id)
);

:::note Identical on the server Server-side export through the API is byte-for-byte identical to what you see in the editor — the same engine generates both, so CI and the UI never drift. :::

tip

Prefer a compact, tool-agnostic format? Export DBML instead, or export JSON to capture the full diagram with layout.