NothingToSeeHere
NothingToSeeHere

Reputation: 2363

Generate a rails migration directly on Heroku

I have some sort of snafu that happened where an intern accidentally uploaded a bit of code to our staging site and then cancelled. Now, there is a page on the staging site that requires a migration that doesn't exist on the staging site.

I'm relatively new to this as well and I'm wondering what the best way to add a migration for that missing column directly to the staging site. Is it

  1. Pull the code, add the migration, push the code (which changes the staging from the dev, as the dev has the master.
  2. Generate the migration in some other way in heroku directly?

I honestly don't even know if the way we think this error happened is actually the truth. I just have to fix it.

Upvotes: 0

Views: 98

Answers (1)

Gearnode
Gearnode

Reputation: 693

If your migration existed you can rollback on directly on heroku in activity onglet.

or

  1. Pull your repo
  2. Add your migration
  3. Push it on heroku
  4. Run heroku run rake db:migrate --app your_staging_app

Upvotes: 1

Related Questions