"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.
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).
npx postgerd -o myOutput.svg
npx postgerd -o myOutput.svg --schema my_schema
npx postgerd -o myOutput.plantuml --plantuml
npx postgerd -o myOutput.nomnoml --nomnoml