-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Using sequelize-cli with Heroku #23
Comments
OK this is weird :D Will try to reproduce that ! |
Can you show me the configuration ? |
seems to work normally for me :-/ can you rerun the command connecting to heroku via |
Thanks for the prompt response! Interestingly, running it via bash worked for me, although I get some " Possibly unhandled errors":
Not yet sure if those are my fault or not... not getting them locally (although I develop on Windows, but not sure why that would matter in this case). In case its still relevant, this is my config:
Finally, I had been using the following command to run the sequelize commands from the command line, which does still doesn't work:
|
So in my infinite wisdom, I realized that the reason I was getting weird errors was I forgot to specify the environment when I was running from bash. When I properly include that, I get the same output as when I was running it without bash:
|
Soooo in re-reviewing everything, I realized it's because I needed another dash before env, so that its |
I think I closed this early. I realized that while it looks to be working, it's running the migrations for production instead of staging, which is what I specified using
Edit: the same thing happens when using |
It seems like that perhaps getEnvironment() in generic-helper.js is "defaulting" to process.env.NODE_ENV and that's why its running it in the production environment, instead of the specified environment in args? Edit: sure enough, once I did |
so tldr: --env is not enforcing the right environment? |
If process.env.NODE_ENV is specified, then you can't override it with --env; unsure if that's desired or not |
ah! i see. hmmm. wow that is hard ... actually I would prefer the |
In short: I think that's the right call. I am relatively new to node... if process.env.NODE_ENV is always set in node to some default, then it always means that --env has no effect. My experience with other languages/environments is that anything provided as a command line argument overrides any other configuration. |
alright cool. do you have any interest in fixing the issue? |
cli/lib/helpers/generic-helper.js Line 24 in e5471a1
|
Sure! Am a bit new to Github, doesn't seem like I can propose edits to the file, nor create a branch to do it in... do I need to be given rights or some such? |
uhm... actually there should be an edit button at the top of the page |
So there is, but its disabled and has the tooltip, "You must be on a branch to make or propose changes to this file." The branches page doesn't seem to have anywhere to add a branch either. I also tried doing it locally and pushing the branch, but did not have permissions to do so. |
Oh interesting. Then: https://help.github.com/articles/fork-a-repo tldr: Fork it, clone it, create a branch, fix the issue, do a |
Thanks kindly! I think its all set and ready: #34 |
I recently upgraded my sequelize from 2.0.0-dev11 to 2.0.0-dev12 and, as part of that, I added in sequelize-cli. Everything is working locally fine, but when I tried to replicate that on Heroku, I ran into issues running when trying to migrate:
I assume I am missing some new or modified configuration I need to do for Heroku, but am at loss for what it might be. Any suggestions?
The text was updated successfully, but these errors were encountered: