In my git repo I have added two different heroku remotes to separate apps (named testheroku and officialheroku).
I am able to push to them separately by specifying their remote name (i.e. git push officialheroku master
) but when try to use heroku run python manage.py syncdb
it only runs syncdb for testheroku.
How do I make heroku run syncdb on officialheroku?
Running Commands on the Heroku Web Interface To use the web console, navigate to your application in Heroku. The same application that you would pass into --app earlier. In the top-right of the interface, there is a “More” button, pressing it displays a “Run Console” option. Select it to add your command.
The Heroku Dashboard now supports heroku run from the App Actions menu. Navigate to your Heroku app to use the App Actions menu.
From the Heroku docs:
heroku run python manage.py syncdb --app officialheroku
As an FYI, the general usage syntax from the CLI is as follows:
heroku COMMAND [--app APP] [command-specific-options]
There are two ways to do this:
heroku --app heroku_app_name
(where the app name is the foo part in foo.herokuapp.com
)heroku --remote git_remote_name
(where the remote name is one of the items that shows up in the list when you run git remote
)If you want to use the git remote names you've defined in the CLI you pass it explicitly using the -r parameter
heroku run python manage.py syncdb -r testheroku|officialheroku
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With