Skip to content

Commit

Permalink
Another migration for existing users
Browse files Browse the repository at this point in the history
  • Loading branch information
kangkyu committed Jul 10, 2024
1 parent a628c49 commit cc3d5e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions db/migrate/20240710204449_regenerate_tokens_existing_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class RegenerateTokensExistingUsers < ActiveRecord::Migration[7.1]
def change
User.find_each do |user|
user.regenerate_auth_token if user.auth_token.nil?
user.save
end
end
end

0 comments on commit cc3d5e0

Please sign in to comment.