Question

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 :)

Was it helpful?

Solution 2

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)

OTHER TIPS

When you run heroku pg:psql you're connecting a postgres client to a remote Postgres database, backing your application on Heroku. This will let you inspect/modify the remote, production database running in your Heroku application.

If you're running a node.js application and need to deply schema changes on your Heroku app, you can run heroku run node schema.js to deploy your most recent schema.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top