class MigrateStudentWorksScoreHomework < ActiveRecord::Migration[5.2]
  def change
    StudentWorksScore.includes(:student_work).find_each do |score|
      score.update_column("homework_common_id", score.student_work&.homework_common_id)
    end
  end
end
