Search code examples
macospostgresqlweb-applicationsherokupostgres.app

How do you create and edit tables etc in a PostreSQL database on heroku if I'm running Snow Leopard?


If I had Apple's Lion (or higher) OS, I would simply:

-follow heroku tutorial: https://devcenter.heroku.com/articles/heroku-postgresql#local-setup

-install postgres.app on my OS

-run "heroku pg:psql" (the above step is required for this command to work)

-and then just run the necessary SQL commands

The problem is that I am running Snow Leopard (upgrading is not an option at the moment for a number of reasons).

postgres.app (see: postgresapp.com) only works on Lion and Mountain Lion.

I haven't been able to find an alternative to postgres.app. Any ideas?

I did see this list of potential alternatives (http://www.postgresql.org/download/macosx/) but I am unsure if they'll work.

Any guidance?

(if it means anything, I'm using node.js.)

Thanks :)


Solution

  • I just found the answer at: http://dailyjs.com/2011/09/26/heroku/

    You seemingly just create a schema.js file which connects to the database as usual and includes all the necessary commands to create the desired tables and then just run that file using:

    "heroku run node schema.js"

    (Sorry. I'm very new to this stuff)