rollback last migration in rails 3 code example Example 1: rails revert migration rake db:rollback Example 2: rails redo last migration rake db:migrate:redo STEP=n