about summary refs log tree commit diff
path: root/db/migrate/20190531082452_move_account_vars_to_users.rb
blob: 18664618b5e83744998a111f9c9b6617c4d386d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
class MoveAccountVarsToUsers < ActiveRecord::Migration[5.2]
  def up
    Account.local.find_each do |a|
      if a.user.present?
        a.user.vars = a.vars
        a.user.save
      end
    end
  end
end