Haseeb Ahmad
Haseeb Ahmad

Reputation: 8730

How to run DB migrations that effect only on heroku fork app

On heroku I create fork app using heroku fork --from sourceapp --to targetapp

By this I copy an existing application and Heroku Postgres data.

Now I push some migrations on fork app using git push forked master.

How I run these migrations on heroku that it effect only heroku-fork app.

When I run heroku run rake db:migrate , is it effect both or only fork one?

Upvotes: 0

Views: 60

Answers (1)

Carlos Ramirez III
Carlos Ramirez III

Reputation: 7434

When you have multiple applications associated with the same codebase, Heroku will ask you which application you want to run the command on.

You'll specify that with the -a or --app flag, so for example

heroku run rake db:migrate --app <APPNAME>

This will allow you to run commands on the fork app or the source app.

Upvotes: 2

Related Questions