class ChangeExerciseQuestionType < ActiveRecord::Migration[5.2]
  def change
    ExerciseQuestion.where(question_type: 1).update_all(question_type: 0)  #新版0为单选题，1为多选题，2为判断题
    ExerciseQuestion.where(question_type: 2).update_all(question_type: 1)

    ExerciseBankQuestion.where(question_type: 1).update_all(question_type: 0)
    ExerciseBankQuestion.where(question_type: 2).update_all(question_type: 1)

  end
end
