MacOS: Mojave 10.14.12
-
Install Java SE: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
-
Download SchemaSpy: http://schemaspy.org/
-
Download PostgreSQL JDBC driver: http://jdbc.postgresql.org/download.html
-
Install pango:
brew install pango
-
Install Graphviz:
brew install graphviz --with-pango
Run the following command to generate your schema:
java -jar path_to_schemaspy -s public -t pgsql -dp path_to_pgsql_driver -db db_name -host localhost -port 5432 -u root -p root -o path_to_output -gv /usr/local/Cellar/graphviz/2.40.1/ -renderer :cairo