Skip to content

Commit

Permalink
Fix devise token auth migration
Browse files Browse the repository at this point in the history
  • Loading branch information
atd committed Oct 5, 2017
1 parent dc7c0c7 commit 3e1993d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/migrate/20170202090345_devise_token_auth_create_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def change
remove_column :users, :authentication_token

User.all.each do |user|
user.update_attribute :uid, user.email
user.uid = user.email
user.tokens = nil
user.save!
end
end

Expand Down

0 comments on commit 3e1993d

Please sign in to comment.