Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kdungs/go-pgviz
Postgres database schema visualizations.
https://github.com/kdungs/go-pgviz
experiment
Last synced: 8 days ago
JSON representation
Postgres database schema visualizations.
- Host: GitHub
- URL: https://github.com/kdungs/go-pgviz
- Owner: kdungs
- License: mit
- Created: 2020-06-23T17:08:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T14:23:47.000Z (over 4 years ago)
- Last Synced: 2023-06-28T00:11:24.387Z (over 1 year ago)
- Topics: experiment
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-pgviz
Postgres database schema visualizations.
_Warning: This is very much a work in progress. It just does what I need it to
do right now and makes some very strong assumptions about the databases (e.g.
doesn't support passwordless auth and assumes that FOREIGN KEY is used properly
throughout). Nevertheless, feel free to send PRs._Install via
```zsh
go get github.com/kdungs/go-pgviz
go install github.com/kdungs/go-pgviz
```The program produces output in `graphviz` format. You'll need to install that
in order to be able to render the output, e.g. via Homebrew on Mac OS using
`brew install graphviz`. Then, you can simply use```zsh
go-pgviz | dot -Tpdf -o deps.pdf
```By default, the program just displays the relationships between the tables. If
you want it to also list all columns, use the `-show-columns` option. For more
information on command line parameters, use```zsh
go-pgviz -help
``````
Usage of go-pgviz:
-db string
Postgres database
-host string
Postgres hostname (default "localhost")
-pass string
Postgres password
-port int
Postgres port (default 5432)
-show-columns
whether to show columns for each table
-show-relations
whether to show relationships between tables (based on foreign keys) (default true)
-user string
Postgres username (default "postgres")
```