title: Rails 3.1: can't write to column in same migration that adds it
body: <p>I had an add_column migration that would run fine.  However, after running it and firing up a console, I would find the first_name and last_name columns completely empty.  I tried using <code>save!</code> instead and it had the same effect--no errors reported.  Here's the original:</p>
  
  <pre><code>class UserAddFirstNameAndLastName &lt; ActiveRecord::Migration
    def change
      # add column first name, last name string
      add_column :users, :first_name, :string
      add_column :users, :last_name, :string
  
      User.all.each do |u|
        u.first_name = 'first name'
        u.last_name = 'last name'
        u.save
      end
    end
  end
  </code></pre>
  
  <p>I also thought this might be some class loading issue, so I inserted the line <code>User</code> to force the user class to reload before the loop.  No dice.</p>
  
  <p>When I split this up into two migrations, the desired effect was achieved.  Does someone have an explanation for this?  I swear I've even done this in the same project with past migrations.</p>
  
  <p>Other notes: Devise for user engine, added the new columns to <code>attr_accessible</code> in User class before running migration.</p>