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 end