Hacker News new | ask | show | jobs
by kiwicopple 672 days ago
> take an existing database schema, developed either in the Supabase migrations ... and draw the diagram?

It might not be so obvious, but this diagram tool is already built into the Supabase Dashboard (under "Database")

I can see some value in providing this as a generic service for any PG database - I'll look into it - but I know that Dbeaver already has something like this built in (and I think pgadmin too)

1 comments

Our scenario is trying to produce a diagram during CICD. We have ongoing changes that happen to our SQL codebase, and it's a constant problem to align our documentation and diagrams to that. If we could see the current ER diagram of 'main' branch, and ideally also any given historic commit, it would be huge for our product owners, as they could consume the diagram and understand the current schema without disrupting the engineers. The CICD pipeline would ideally spit out a static page of the ER diagram during build, either as SVG or HTML.

Dbeaver and PGAdmin's diagramming functions aren't anywhere near as advanced as what you've built here, and fall apart for large diagrams. Your team has a lot of smarts!

This one isn’t available in that format, but it looks like this open source tool could help:

https://github.com/KarnerTh/mermerd