Last active
December 12, 2015 02:38
-
-
Save ankane/4700495 to your computer and use it in GitHub Desktop.
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 | |
# From http://chrismccord.com/blog/2013/01/09/better-heroku-db-push-and-db-pull/ | |
# | |
# Postgres equivalent to heroku db:push. | |
# Pushes local database up to heroku application database. | |
# | |
# Requirements: psql --version >= 9.2.2 | |
# | |
# Usage: | |
# | |
# $ heroku_pg_push [appname] [local database name] | |
# | |
heroku pg:reset DATABASE_URL -a $1 | |
pg_dump -xO $2 | psql `heroku config:get DATABASE_URL -a $1` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment