Created
July 25, 2018 07:47
-
-
Save keklikhasan/8bc48365855448102b0ea26b7cacb096 to your computer and use it in GitHub Desktop.
document your database via schemaspy http://schemaspy.org/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dt=$(date "+%Y_%m_%d_%H_%M_%s") | |
echo $dt | |
folder="[PATH]/schmaspy" | |
if [ -d "$folder" ]; then | |
mv "$folder" "${folder}_backup_$dt" | |
fi | |
mkdir "$folder" | |
# for more info http://schemaspy.org/ | |
docker run -v "$folder:/output" schemaspy/schemaspy:snapshot -hq -t pgsql -u postgres -db postgres -host host.docker.internal -port 5432 -all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment