postgerd
v1.0.7
Published
Generate erd diagrams for postgres
Downloads
233
Readme
PostgERD
"Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious." - Fred Brooks, The Mythical Man-Month
PostgERD connects to your postgres database with environment variable credentials (using dotenv if needed) and generates an ERD svg from what it finds there. Can also output PlantUML or nomnoml. Supports multiple db schemas.
Note: Foreign key connections across schemas are only supported in the PlantUML output.
Installation
To install:
npm install --save-dev postgerd
Also make sure you have postgres connection environment variables set (that is, either DATABASE_URL or PGUSER,PGPASSWORD,PGHOST, and PGDATABASE).
To output an svg:
npx postgerd -o myOutput.svg
To restrict it to a single schema in the database
npx postgerd -o myOutput.svg --schema my_schema
To output a plantuml file:
npx postgerd -o myOutput.plantuml --plantuml
To output a nomnoml file:
npx postgerd -o myOutput.nomnoml --nomnoml