class AddExecTimeToChallenge < ActiveRecord::Migration[5.2]
  def change
    add_column :challenges, :exec_time, :integer

    Shixun.find_each do |shixun|
      shixun.challenges.update_all(exec_time: shixun.exec_time)
    end
  end
end
