Last active
December 21, 2015 07:58
-
-
Save sao/6274751 to your computer and use it in GitHub Desktop.
Add user and database to postgres from terminal
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
createuser --no-createdb --no-createrole --no-superuser [username] | |
createdb --owner [username] --encoding utf8 [database] | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] -d [database] -p 5432 [data_file] | |
PGUSER=[username] heroku pg:pull HEROKU_POSTGRESQL_NAME [local_database] --app app-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment