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 b2e8f2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion db/migrate/20170202090345_devise_token_auth_create_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ def change
dir.up do
remove_column :users, :authentication_token

User.reset_column_information

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 b2e8f2c

Please sign in to comment.