Skip to content

Instantly share code, notes, and snippets.

@A5308Y
Created March 1, 2019 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A5308Y/6aa80922b9ffeb8b689ea2f67ded15b1 to your computer and use it in GitHub Desktop.
Save A5308Y/6aa80922b9ffeb8b689ea2f67ded15b1 to your computer and use it in GitHub Desktop.
LATEST_DUMP=$(ls -tr ~/tempfiles | tail -n 1)
dropdb -h localhost -U webapp webapp_development && createdb -h localhost -U webapp webapp_development
psql -h localhost -U webapp -f ~/tempfiles/$LATEST_DUMP -d webapp_development -e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment