Created
April 4, 2019 14:41
-
-
Save daryl-sf/9d34f8a8153f7a6791c5e0e18bda271d to your computer and use it in GitHub Desktop.
drop and recreate dev
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 | |
echo 'Dropping squarefoot_development DB'; | |
dropdb 'squarefoot_development'; | |
echo 'Recreating squarefoot_development DB'; | |
psql -c 'create database squarefoot_development'; | |
psql squarefoot_development -c 'CREATE extension plpgsql'; | |
psql squarefoot_development -c 'CREATE extension postgis'; | |
psql squarefoot_development -c 'CREATE extension hstore'; | |
pg_restore --verbose --clean --create --no-acl --no-owner -h localhost -U $USER -d squarefoot_development $1 | |
echo 'Done!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment