https://github.com/nktks/spanner-er
generate er diagram from spanner schemas
https://github.com/nktks/spanner-er
google-cloud-spanner spanner
Last synced: 26 days ago
JSON representation
generate er diagram from spanner schemas
- Host: GitHub
- URL: https://github.com/nktks/spanner-er
- Owner: nktks
- License: mit
- Created: 2020-03-04T14:05:54.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-31T10:41:26.000Z (over 1 year ago)
- Last Synced: 2024-04-17T21:21:26.768Z (about 1 year ago)
- Topics: google-cloud-spanner, spanner
- Language: Go
- Size: 90.8 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spanner-er [][license] [](https://github.com/nktks/spanner-er/actions)
[license]: https://github.com/nktks/spanner-er/blob/master/LICENSE
`spanner-er` is a command-line tool to generate ER diagram from DDL schama file.
# Install
## Install to host
`spanner-er` depends on graphviz.
Install graphviz on your host platform.
```
brew install graphviz
```
or
```
apk add --no-cache graphviz ttf-freefont
```
or
```
apt-get update && apt-get install graphviz
```
Install spanner-er
```
go get -u github.com/nktks/spanner-er
```## Use docker
you can use docker image
```
docker run --rm -v `pwd`:/go/src/github.com/nktks/spanner-er --workdir="/go/src/github.com/nktks/spanner-er" ghcr.io/nktks/spanner-er -h
```
or
```
git clone [email protected]:nktks/spanner-er.git
cd ./spanner-er
./scripts/spanner-er-docker.sh -h
```
In this case, you should use relative path for `-s`, `-o` option.# Usage
```
spanner-er -h
Usage:
-T string
output file type. default is png(pass to dot option -T) (default "png")
-h print help
-o string
output file name.default is spanner_er.(pass to dot option -o)
-s string
spanner schema file
```# Sample image
