Created
June 20, 2020 09:15
-
-
Save mahasak/82dc17faf73863832bf91c1589424931 to your computer and use it in GitHub Desktop.
reload db postgres script
This file contains hidden or 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 | |
if [[ ! -n $REIMPORTDB_PATH ]]; then | |
export REIMPORTDB_PATH=/usr/local/bin/ | |
fi | |
${REIMPORTDB_PATH}dropdb --if-exists {DB_NAME} | |
${REIMPORTDB_PATH}createdb -U{DB_USER} -O{DB_USER} {DB_NAME} | |
${REIMPORTDB_PATH}psql -U{DB_USER} {DB_NAME} < database/schema_postgres.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment