Heroku specify which app to run command on?

bab picture bab · Jun 12, 2013 · Viewed 9.5k times · Source

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?

Answer

zeantsoi picture zeantsoi · Jun 12, 2013

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]