blob: c89b6049fb3bdfe95b5e074af47916c0e9b71c4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
class MigrateUserKoboldsToAccount < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
Account.local.find_each do |account|
next if account.user.nil?
account.kobold = account.user.settings.is_a_kobold? || false
account.gently = account.user.settings.gentlies_kobolds? || false
account.save
end
end
end
|