- Launch docker database
docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres:latest
- connect to database using pgadmin
- user: postgres
- password: mysecretpassword
- Restore backup
- copy contents of install.sql
- locate pgadmin bin path and run
"C:\Program Files\pgAdmin 4\v6\runtime\psql.exe" "host='localhost' port='5432' dbname='Adventureworks' user='postgres' sslmode='prefer' sslcompression='False' " < install.sql
- generate output see
schemacrawler \ --server=postgresql --database=Adventureworks \ --port=5432 --user=postgres --host=host.docker.internal --password=mysecretpassword \ --info-level=maximum \ --command script \ --script-language python \ --script ./share/mermaid.py > ./share/output_pg.md
- other commands
schemacrawler -h
-
schemacrawler \ --server=postgresql --database=Adventureworks \ --port=5432 --user=postgres --host=host.docker.internal --password=mysecretpassword \ --info-level=maximum --command=schema > ./share/raw_pg.txt
-
schemacrawler \ --server=postgresql --database=Adventureworks \ --port=5432 --user=postgres --host=host.docker.internal --password=mysecretpassword \ --info-level=maximum execute --command list