1

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

dgldy
  • 83
  • 2
  • 7
  • I'll make this the answer to my question after the 8 hour waiting period. 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) – dgldy Sep 17 '13 at 22:00

2 Answers2

2

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.

Winfield
  • 18,985
  • 3
  • 52
  • 65
1

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)

dgldy
  • 83
  • 2
  • 7