sqldelight
sqldelight copied to clipboard
Plugin: Add sql diagram
Description
It would be very cool, if the plugin could show a database diagram, (tables, attributes, references).
Seems like SchemaCrawler can do this for free so we should probably just use that
Yeah, sounds good. Personally, I would like to see mermaid diagrams after Dokka and GitHub markdown support.
I would not expect this functionality in sqldelight core. And schema crawler supports a JSON export. So if you plan to include schema crawler, it would be nice, if it also saves the json output too for further processing.
we already use schemacrawler in the gradle plugin to verify migrations which is why that was the route I was thinking. I think bundled in the SQLDelight IDE would be pretty sweet if its not a massive effort to maintain, but I don't feel strongly about it
Ah nice. I will try to experiment with schema crawler and mermaid tomorrow. Maybe adding the diagram as kdoc comment to the generated DB file is sufficient. At least for me adding the diagram in the docs and publish them with dokka is enough.