Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support require('pg') and require('pg').native to enable SSL connections #49

Closed
brweber2 opened this issue Sep 19, 2012 · 4 comments
Closed
Labels

Comments

@brweber2
Copy link

Here is what I really want to do:

  • update my database.json file with my heroku postgres db connection info
  • run db-migrate against a remote postgres heroku instance

Heroku only allows remote connections to come over SSL. My understanding is that this requires('pg').native. So I'd love for some way to specify whether I want 'pg' or 'pg' native. Then I can try to run my remote migrations (and I'll let you know if it works or if I run into another issue...).

Thanks!

@kunklejr
Copy link
Contributor

What do you think about having db-migrate fall back to loading a database.js file if no database.json file is found? You'd be responsible for exporting the environment configurations similarly to what's found in database.json but it would give you a chance to select the appropriate driver using code rather than a string-based loading convention.

@brweber2
Copy link
Author

That works for me. It would allow people to connect to other databases as well (admittedly it might not work... but they could try). If you add it, please document an example in the README (I'm happy to help you write it).

In fact, if I can get it working, I'll contribute instructions on how to run against a Postgres instance on Heroku.

Thanks!

@kunklejr
Copy link
Contributor

@brweber2 will #57 serve your needs for now?

@tristanz
Copy link

This is fixed in #106. Simply add "native": true do your database.json production entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants