DEV Community

Discussion on: How to visualize a PostgreSQL schema as SVG with SchemaSpy

Collapse
 
jonlauridsen profile image
Jon Lauridsen • Edited

Thanks for the article. I didn't want to download SchemaSpy so for anyone else interested you can run it straight via Docker:

docker run --rm -it schemaspy/schemaspy:latest --help
Enter fullscreen mode Exit fullscreen mode

I've cooked up this command to generate report from my locally-running DB:

docker run --rm -it -v "$(pwd)/output":/output  --network host schemaspy/schemaspy:latest -t pgsql -db <db> -host <host> -s <schema> -u <user> -p <password> -hq -imageformat svg
Enter fullscreen mode Exit fullscreen mode

Documentation is on schemaspy.readthedocs.io.