class MograteHackUserScore < ActiveRecord::Migration[5.2]
  def change
    HackUserLastestCode.where(score: 0, status: 0).includes(:hack).find_each do |user_hack|
      user_hack.update_column(:score, user_hack.hack&.score)
    end
  end
end
