Skip to content

Generated database schema documentation

Changes proposed in this pull request:

  • Adds make db-docs-gen, which runs tbls via go run github.com/k1LoW/[email protected]
    • Noting that I pinned to the latest version of the tool, not sure we think that's necessary.
    • I considered adding this as a Go tool, but adds a huge amount of noise to the go.mod and I wasn't sure it was worth that.
    • An alternative would be to run brew install tbls, or otherwise download the binary.
  • Might be nice to have this run in a git-hook pre-commit when there's an update to migrations, but IMO would rather address that in a separate PR that also automates other automatic generations, i.e. for Tern.
  • Configures tbls to load DB connection info from environment, use mermaid for diagrams (was more readable than SVG), increase diagram spacing for legibility, and exclude tool tables for tern and river.
  • Commits the generated documentation (I am particularly excited for the mermaid diagrams).
  • Adds notes to main README.md w/ links to other doc files and info about regenerating the schema docs

Security considerations

Runs a third-party tool to generate documentation.

Merge request reports

Loading