In Hacktoberfest 2022 I started working on SQL DDL import and export for Draw.io. This year I went back to that code.
What changed
Draw.io can't turn a diagram into SQL or read SQL into a diagram on its own, so I keep a set of plugins that do both. The plugins:
- import SQL DDL into a Draw.io diagram
- export a diagram back to SQL DDL
The October 24 push to the repo (version 0.0.7) fixed foreign key line generation and export so they behave the same across the supported database types. It also added PostgreSQL relationship arrows, and updated the unit tests and docs.
The code is in sqltooling-drawio. The README covers installing the plugins in the Draw.io desktop app or in the VS Code integration.
The Draw.io pull requests
The two pull requests I opened against jgraph/drawio in 2022 were closed, because Draw.io doesn't accept outside contributions. They are still the clearest picture of what the plugins do:
Related package
@funktechno/sqlsimpleparser parses SQL DDL into the JSON models the import plugin feeds to Draw.io.


Top comments (0)