On Tue, Jun 7, 2011 at 9:25 AM, Rodrigo Ruiz <[email protected]>wrote:
> I made a database with rails generate model User password:string ... > now I want to delete the password attribute, because I'm going to encrypt > it before saving, so I want to make an attribute with name > encrypted_password instead of password. > How can I do that without deleting the whole file of migration and making > all from scratch? > > you can do this by creating a *NEW *migration like add_column :users, :encrypted_password, :string # insert here the steps that will convert password to encrypted_password remove_column :users, :password or use devise/authlogic. > Thank you > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

