Copy Postgresql database to another app (test app) for testing. - MUMT-IT/mis2018 GitHub Wiki

Add postgresql database to the target app.

Run:

heroku pg:copy -a source-app source-app::DATABASE_URL -a target-app target-app::HEROKU_POSTGRESQL_COLOR

Replace source-app, target-app and HEROKU_POSTGRESQL_COLOR accordingly.

Note, run this command to look up HEROKU_POSTGRESQL_COLOR.

heroku pg:info -a target-app

Then, run:

heroku pg:promote HEROKU_POSTGRESQL_COLOR -a target-app