question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What is the proper way to migrate DB on heroku?

See original GitHub issue

Can’t possibly make that working, probably there’s need to force migration to use ssl, but how to do it?

Code pushed to heroku then

heroku run ./db-migrate up

does not finds any migrations (db-migrate is symbolic link to node_modules/db-migrate/bin/db-migrate)

please refer to #49 as there’s some info about fallback to database.js (which is not working as I checked), and there’s no info what to return there?

Manually changing

var pg = require('pg')

to

var pg = require('pg').native

triggers segmentation fault error:

WARNING: ev_io is deprecated, use uv_poll_t
Segmentation fault

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
GreatKikalecommented, Dec 13, 2016

Sure! Here it is, in my case I have two environments:

{
  "devPg": {
    "driver": "pg",
    "host":"localhost",
    "database":"yourdbname",
    "user": "youruser",
    "password": "yourpassword",
    "multipleStatements": true
  },

  "prod": {
    "driver": "pg",
    "native": "true"
  }
}
0reactions
chrishublocommented, Dec 15, 2016

@GreatKikale Thanks !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I migrate my heroku database? - Stack Overflow
Correct : PROMPT> heroku run rake db:migrate --app myApp. Running rake db:migrate attached to terminal... up, run.2810. Share. Share a link to this...
Read more >
Migrating Heroku Postgres Databases to Private Spaces
The follower changeover method lets you migrate a production database while the original database is still operating.
Read more >
Run migrations when deploying to Heroku - mentalized.net
Migrations can be run by anyone/anything that can push to the git remote; If a migration fails, the deployment is halted, your database...
Read more >
Migrate Heroku Postgres Databases Without Problems
Migrating databases can be risky without the proper precautions. Here's how to prevent problems when migrating Heroku Postgres Databases.
Read more >
Automatically migrate database when pushing to Heroku
Heroku makes deploying Ruby web app a breeze, however it doesn't run rake db:migrate automatically each time you push a new commit to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found