Generate Entity-Relationship Diagrams from PostgreSQL by PlantUML, DBML-renderer, ERAlchemy.
- PostgreSQL*
- graphviz==2.49.0
- dbml-renderer==1.0.27
- plantuml (specific version present in the repository)
- npm==9.6.7
- node==v18.17.0
- Java Runtime Environment*
To download repository:
git clone https://github.com/alinzh/database_visualization.git
Install Graphviz for your version of Windows by following this link: https://graphviz.org/download/
Install Graphviz on Linux:
sudo apt-get install graphviz libgraphviz-dev
Next:
pip install -r requirements.txt
sudo npm install -g @softwaretechnik/dbml-renderer
Run:
python main.py --host HOST --port PORT --user USER --password PASSWORD \
--db_name DB_NAME --schema_name SCHEMA_NAME --engine ENGINE --direction DIRECTION
DIRECTION and ENGINE is optional arguments.
Available engines:
- 'plantuml'
- 'eralchemy'
- 'dbml-r'
Available direction: If you are not satisfied with the location of the blocks on the diagram, change their location by adding the argument DIRECTION = '2'.