blob: 2184cc4e193a775d065c867f3b1bbe27930bdad5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# frozen_string_literal: true
class ConfirmSecurityBot < ActiveRecord::Migration[6.0]
class User < ActiveRecord::Base
self.table_name = 'users'
SECURITY_BOT_TYPE = 8
end
def up
User.where(user_type: User::SECURITY_BOT_TYPE, confirmed_at: nil)
.update_all(confirmed_at: Time.current)
end
# no-op
# Security Bot should be always confirmed
def down
end
end
|