• Stars
    star
    546
  • Rank 80,864 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate PlantUML ER diagram textual description from PostgreSQL tables

planter

test GitHub license Go Report Card

Generate PlantUML ER diagram textual description from PostgreSQL tables

Why created

A team with only software engineers doesn't need ER diagram that much as long as they have decent experience in Relational Database modeling. However, it becomes very helpful to have always-up-to-date ER diagram when marketing/promotion/operation teams consisting of those who are fluent in writing/reading SQL, join to the game.

PlantUML supports ER diagram in the latest version with this awesome pull request. The tool, planter, generates textual description of PlantUML ER diagram from pre-existing PostgreSQL tables, and makes it easy to share visual structure of relations with other teams.

Installation

go get -u github.com/achiku/planter

Quick Start

$ planter postgres://planter@localhost/planter?sslmode=disable -o example.uml
$ java -jar plantuml.jar -verbose example.uml

er diagram

Specify table names

planter postgres://planter@localhost/planter?sslmode=disable \ 
    -t order_detail \
    -t sku \
    -t product

Help

$ planter --help
usage: planter [<flags>] <conn>

Flags:
      --help                 Show context-sensitive help (also try --help-long and --help-man).
  -s, --schema="public"      PostgreSQL schema name
  -o, --output=OUTPUT        output file path
  -t, --table=TABLE ...      target tables
  -x, --exclude=EXCLUDE ...  target tables
  -T, --title=TITLE          Diagram title

Args:
  <conn>  PostgreSQL connection string in URL format

Test

setup database.

create database planter;
create user planter;

run go test ./... -v

More Repositories

1

jungle

AWS operations by cli should be simpler
Python
844
star
2

wbs

Watch, build, and (re)start Go server auto-reloader customizeable by toml
Go
54
star
3

sample-golang-soap-xml

Golang SOAP examples
Go
38
star
4

pgpart

Creating PostgreSQL partitioned table DDL should be easier.
Python
31
star
5

soapc

Golang SOAP client
Go
24
star
6

varfmt

Convert string into Go variable name following Go naming convention
Go
22
star
7

hipnotify

Deadly simple HipChat API V2 room notification library
Python
17
star
8

pgtxdb

Single transaction sql driver for golang
Go
16
star
9

sample-flask-sqlalchemy

sample set up for Flask + SQLAlchemy + py.test + factory_boy
Python
15
star
10

testable-go-rdbms

Sample setup for testable Go RDBMS backed application
Go
12
star
11

go-http-api-server

Go 1.7+ HTTP API server sample
Go
9
star
12

ansible-playbook-lnd

Ansible role to install and manage lnd configuration
Python
7
star
13

kaonashi

Headless local note app with just-enough set of RESTful APIs
Go
6
star
14

sample-golang-pgx-transaction

Sample Golang pgx transaction
Go
5
star
15

sample-sqlalchemy-alembic

Sample setup for SQLAlchemy and Alembic
Python
5
star
16

ovw

Merge two structs, and overwrite fields when necessary
Go
4
star
17

qbx

Go query builder for pgx
Go
4
star
18

sample-golang-ql

Sample setup for ql
Go
3
star
19

testsvr

Make httptest generated test server aware of -v of go test
Go
3
star
20

gotodoit

Go Conference JP 2017, 2018 Sample App
Go
3
star
21

gotodocli

Go Conference JP 2018 Sample App
Go
2
star
22

sample-golang-pgx

Sample Golang pgx
Go
2
star
23

sample-uwsgi-pypy

Sample setup for uwsgi + pypy
Python
2
star
24

prmdg

prmd JSON Hyper Schema to Go struct, and validators
Go
2
star
25

nafd

Create name card from Google Slide and Sheet
TypeScript
2
star
26

cnps

See who's coming to your event
Python
2
star
27

sample-golang-wsdl

Sample setup for Golang + wsdl
Go
2
star
28

sample-h2o-mruby

Sample setup for h2o + mruby
Python
2
star
29

saru

An Interpreter
Go
1
star
30

sample-golang-clientcert

Go TCP/TLS server, and client
Go
1
star
31

redash-tips

sql tips
1
star
32

dotfiles

achiku's dotfiles
Vim Script
1
star
33

achiku.github.io

akirachiku.com
HTML
1
star
34

shipmenttimes

ship it like a rockstar
Go
1
star
35

smith

The Agent
Go
1
star
36

sample-geolocation

Sample setup for mysql/psgr spatial functionality
Python
1
star
37

sample-golang-test-server

Sample Golang http server test
Go
1
star
38

sample-ethereum

1
star
39

sample-golang-xhandler

Sample xhandler
Go
1
star
40

webque

Go HTTP Queue/Worker Experiment
Go
1
star
41

kaonashi-central

Headless note server with just-enough set of RESTful APIs
Go
1
star
42

ubuntu-nginx-uwsgi-python3

Dockerfile for Ubuntu 16.04 + nginx + uwsgi + python3 + flask on AWS Elasticbeanstalk/ECR
Python
1
star
43

sample-sqlalchemy-postgres

Sample setup for Postgres partitioning with SQLAlchemy
Python
1
star