Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qweeze/pg_diagram

A tool to convert postgresql schema to ER diagram
https://github.com/qweeze/pg_diagram

entity-relation postgres postgresql python

Last synced: 2 months ago
JSON representation

A tool to convert postgresql schema to ER diagram

Awesome Lists containing this project

README

        

## pg_diagram

[![PyPI version](https://badge.fury.io/py/pg-diagram.svg)](https://badge.fury.io/py/pg-diagram)

A tool for creating [Entity-relationship diagrams](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model) for PostgreSQL

### Installation

- install [Graphviz](https://graphviz.org)
-
```bash
pip install pg-diagram
```
### Usage
```bash
pg_diagram --format svg -o diagram.svg schema.sql
```
```bash
# or feed output of pg_dump
pg_dump --schema-only mydb | pg_diagram -o mydb.png -
```

### Sample output


diagram image