I recently added a new column called auth_token to my users which is suppose to be generated when the new user is created.
How do I add an auth_token to my existing users via migrations?
Source: http://railscasts.com/episodes/274-remember-me-reset-password
ps. I cannot find this in http://guides.rubyonrails.org/migrations.html so please don’t send me there.
You can put any standard Ruby/Rails code you like into a migration. Just be mindful of stdin/out and whether or not any particular libs you’d need are loaded into the memory space of the migration.