This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
class UpdateExerciseDefaultValue < ActiveRecord::Migration[5.2]
def change
ExerciseUser.where(objective_score: -1.0).update_all(objective_score: 0.0)
# ExerciseUser.where(subjective_score: -1.0).update_all(subjective_score: 0.0) #主观题默认分数为-1,不需修改
# ExerciseAnswer.where(score: -1.0).update_all(score: 0.0) #6.10 修改,方便判断主观题是否
end