title: rollback failed for rails migration
body: <p>I made a mistake in editing a rails migration (I'm using rails 3.1.0rc5).  So I corrected it and attempted to do a <code>rake db:rollback</code> followed by a <code>rake db:migrate db:test:prepare</code>.  But the rollback failed for some reason.  Here's the rollback portion of the migration:</p>
  
  <pre><code>  def down
      drop_table :assets
    end
  </code></pre>
  
  <p>this is the response from <code>db:rollback</code>:</p>
  
  <pre><code>==  CreateAssets: reverting ===================================================
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  ActiveRecord::IrreversibleMigration
  
  Tasks: TOP =&gt; db:rollback
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>so I just manually deleted the assets table in the database (I'm just using the sqlite3 dbs), commented out the <code>drop_table :assets</code> line and ran <code>db:rollback</code> again:</p>
  
  <pre><code>==  CreateAssets: reverting ===================================================
  -- drop_table("assets")
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  SQLite3::SQLException: no such table: assets: DROP TABLE "assets"
  
  Tasks: TOP =&gt; db:rollback
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>Why is it trying to drop the assets table?  I commented out (and actually later deleted) that <code>drop_table :assets</code> line from the migration.  I even did a <code>grep -r assets</code> to see where rails might be getting that drop command from, but couldn't find anything.</p>
  
  <p>So my question is how do I get this migration re-run?  And I'm curious where rails is getting that drop command?</p>
  
  <p><strong><em>UPDATE</em></strong>: It turns out that rails 3.1 actually doesn't look at the migration class' <code>down</code> method when rolling back!  It looks at the <code>change</code> method's migration commands and reverses them.  That's why <code>rake db:rollback</code> was trying to drop the assets table even after I removed the <code>drop_table :assets</code> instruction!  How I fixed this is I changed the <code>change</code> method to the old rails 3.0 style <code>up</code> method.  Then rails looked at the <code>down</code> method which I had removed the <code>drop_table</code> command from and the rollback was successful.</p>