1. Enable maintenance mode
1
| heroku maintenance:on --app APP_NAME
|
2. Add a new plan
1
| heroku addons:create heroku-postgresql:hobby-basic --app APP_NAME
|
3. Copy data from the current database to the new one
1
| heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_CYAN_URL --app APP_NAME
|
Note: DATABASE_URL and HEROKU_POSTGRESQL_CYAN_URL are Heroku environment variables. Run heroku config to check their values.
4. Select the new database as the default
1
| heroku pg:promote HEROKU_POSTGRESQL_CYAN_URL --app APP_NAME
|
5. Disable maintenance mode
1
| heroku maintenance:off --app APP_NAME
|