customink / secondbase

Seamless second database integration for Rails.
MIT License
220 stars 31 forks source link

On heroku we can't run migrations for second_db #46

Closed misteral closed 2 months ago

misteral commented 7 years ago

Rails: 4.2.3

Migration status stuck on this state and config: https://gist.github.com/misteral/a87538b1c66007d4d9ec322716884822

I can easy run migration from local comp after change development second db as production redshift second_db. How I can fix it?

hmadison commented 7 years ago

What error are you getting when trying to run migrations on heroku?

misteral commented 7 years ago

No, errors. It run second_db_migrations on primary db. Look https://gist.github.com/misteral/a87538b1c66007d4d9ec322716884822#file-gistfile1-txt-L791

metaskills commented 7 years ago

This looks like a db:migrate:status command. We do not have any support for that command. So the report would not be accurate. Would this be a fair assessment?

misteral commented 7 years ago

@metaskills this is db:migrate:status command listed as a prof what system incorrectly take primary db as secondary db (db name is the same), but database.yml has corrected config, it work in started rails app. Make sense?

metaskills commented 7 years ago

Thanks, it does make sense but at the same time does not help. Can you share the output of a Heroku command that does something wrong and/or investigate what is happening? I can't tell from the logs you are sharing nor can I think of any reason it wold work locally vs on any remote server. Unless that remote server has some ENV that changes behavior I am unfamiliar with. Anything you can provide to debug more would be helpful.