Sha256: 6018f45c8bdbb283ca41ef1e6bc46d98dec6072952c53f63c923f900d7792167

Contents?: true

Size: 348 Bytes

Versions: 4

Compression:

Stored size: 348 Bytes

Contents

# This script migrates the authpwn 0.20 token codes and user IDs to the new
# 0.21 format.
# It should be run in a rails console.

Credential.all.each do |token|
  next unless token.kind_of? Tokens::Base
  token.code = Tokens::Base.random_code
  token.save!
end

User.all.each do |user|
  user.exuid = nil
  user.set_default_exuid
  user.save!
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
authpwn_rails-0.23.0 legacy/migrate_020_to_021.rb
authpwn_rails-0.22.1 legacy/migrate_020_to_021.rb
authpwn_rails-0.22.0 legacy/migrate_020_to_021.rb
authpwn_rails-0.21.1 legacy/migrate_020_to_021.rb