I deploy Rails 5 with PostgreSQL to free app in Heroku. This is my configuration from database.yml:
database.yml
production: adapter: postgresql username
After delete old DB, you should execute this
heroku pg:promote HEROKU_POSTGRESQL_NEW_DATABASE
You can check your DB nickname by
heroku pg:info