Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
example script to upgrade a heroku postgresql database
set -x
set -e
export APP_NAME=staging-webfarmforeman
heroku addons:add pgbackups --app $APP_NAME
heroku addons:add heroku-postgresql:hobby-basic --app $APP_NAME
heroku pg:wait --app $APP_NAME
heroku maintenance:on --app $APP_NAME
# heroku ps:scale worker=0 --app $APP_NAME
heroku pgbackups:transfer DATABASE_URL ${NEW_DB_NAME}_URL --app $APP_NAME
heroku pg:promote $NEW_DB_NAME
heroku maintenance:on --app $APP_NAME
# heroku ps:scale worker=1 --app $APP_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.