title: Can Rails Migrations be used to convert data?
body: <p>I'm trying to convert a column in my Rails app, for arguments sake let's pretend I'm trying to change the <code>age</code> column in my <code>users</code> table to a string representation rather than an int.</p>
  
  <p>In my migration I have this;</p>
  
  <pre><code>def.self up
      add_column :users, :age_text, :string
  
      users = User.find(:all)
  
      users.each do |u|
         u.age_text = convert_to_text(u.age)
         u.save
      end
  end
  
  def self.convert_to_text(number)
     #code here to convert 1 to 'one' etc
  end
  </code></pre>
  
  <p>But it doesn't seem to be working, is what I'm attempting here even possible with migrations?</p>