Working with Databases on Heroku
Heroku uses a relational database management system (RDBMS) name PostgreSQL for its projects. Unfortunately, there is not a lot of documentation on how to use Heroku’s databases with a PHP application (though there is a lot for using Ruby and nodeJS). Fortunately, I have worked through some of the issues that will come up in using PostgreSQL on Heroku with a PHP application.
By default, PHP applications do not get a database automatically created when the project is initiated (Rails projects do). The first step is to create a shared-database with the
heroku command-line interface, as shown in Listing 11–9.
heroku addons:add shared-database -----> Adding shared-database ...