#database
5 posts tagged database. Clear filter
-
Connect to Postgres on Heroku using DATABASE_URL Config Var with PHP and PDO
Unfortunately PHP's PDO constructor doesn't take a database connection url (in a format that Heroku makes available as a config var) as an argument. It has its own, rather odd syntax. However, it's...
-
Manual ManyToMany Through with Django's ORM
Here is a code snippet that demonstrates how to set up a ManyToMany through relationship in Django. In Rails, the equivalent would be called a hasmany through association. If you set the through...
-
How to Import/Export a Database from One Heroku App to Another Heroku App
Heroku is awesome! Let's say we want to copy a production database to a staging database. We can use the pg:backups:restore command to accomplish this. Here is an example. For the source database...
-
How To Create a Dump File in Postgres Compatible with Heroku
When Heroku creates a dump file of your Postgres database it uses the -Fc option It is equivalent to running pgdump -Fc -d nameofdb nameofdb.dump This command will let you import your database with...
-
Installing Redis Server and Client on Mac OS X and Ubuntu