29

Normally when I do

$ rake db:rollback

it rolls back one migration. But now, repeatedly times, it has rollbacked 3 steps.

How come this behaviour?

I'm on Rails 3.2.13.

Nithin
  • 3,679
  • 3
  • 30
  • 55
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232

1 Answers1

79

You can specify the number of steps like this:

rake db:rollback STEP=3

The STEP parameter is actually an environment variable here. If, in your terminal, you run the command echo $STEP, does it return 3? If it does, you can execute export STEP=1 to get back to expected behaviour. If it happens again, try to find out where this environment variable is being set.

Jaap Haagmans
  • 6,232
  • 1
  • 25
  • 30