Skip to content

Instantly share code, notes, and snippets.

@aarkerio
Created July 16, 2021 05:25
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 aarkerio/65daaec9629df3150a18f30f0e114a33 to your computer and use it in GitHub Desktop.
Save aarkerio/65daaec9629df3150a18f30f0e114a33 to your computer and use it in GitHub Desktop.
Heroku Postgresql upgrade
1) Check your database name
heroku pg:info --app incartupsell | grep HEROKU
HEROKU_POSTGRESQL_GREEN_URL
1) Provision a Follower
heroku addons:create heroku-postgresql:standard-2 --follow HEROKU_POSTGRESQL_GREEN_URL --app incartupsell
heroku pg:wait --app incartupsell
heroku pg:info --app incartupsell
2) Enter maintenance mode
heroku maintenance:on --app incartupsell
3) Upgrade the follower
heroku pg:upgrade HEROKU_POSTGRESQL_AMBER --version 11 --app incartupsell
heroku pg:wait --app incartupsell
4) Promote the new database
heroku pg:promote HEROKU_POSTGRESQL_AMBER --app incartupsell
5) Exit maintenance mode
heroku maintenance:off --app incartupsell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment