O'Reilly logo

Beginning Facebook Game Apps Development by Wayne Graham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Listing 11–9. Adding a Database to a Heroku Project

heroku addons:add shared-database -----> Adding shared-database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required