X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b606acba0c28652fa6f066c2b5d989ceae41c194..ddac660f3b7cc09a7718f20d1b857b0794d5a4ef:/db/migrate/004_user_enhancements.rb diff --git a/db/migrate/004_user_enhancements.rb b/db/migrate/004_user_enhancements.rb index d12b02c0a..99da718fd 100644 --- a/db/migrate/004_user_enhancements.rb +++ b/db/migrate/004_user_enhancements.rb @@ -24,7 +24,7 @@ class UserEnhancements < ActiveRecord::Migration[4.2] add_index "user_tokens", ["token"], :name => "user_tokens_token_idx", :unique => true add_index "user_tokens", ["user_id"], :name => "user_tokens_user_id_idx" - User.where("token is not null").each do |user| + User.where.not(:token => nil).each do |user| UserToken.create(:user_id => user.id, :token => user.token, :expiry => 1.week.from_now) end