title: Why didn't this rails migration preserve the value in the database?
body: <p>So our Rails 4.2 app had a custom password authentication mechanism (very similar to has_secure_password) before we switched to has_secure_password with the following migration:</p>
  
  <pre><code>def change
    rename_column :users, :encrypted_password, :password_digest
  end
  </code></pre>
  
  <p>When I ran the migration, somehow the values of encrypted_password were not saved in password_digest.  Why might this be?  And what can be done to resolve it?</p>