|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
class AddChoiceIndexToExerciseAnswers < ActiveRecord::Migration[5.2]
|
|
|
|
|
def change
|
|
|
|
|
add_column :exercise_answers, :choice_index, :integer, default: 1
|
|
|
|
|
# add_column :exercise_answers, :choice_index, :integer, default: 1
|
|
|
|
|
|
|
|
|
|
multi_questions = ExerciseQuestion.where(question_type: 1)
|
|
|
|
|
multi_questions.includes(:exercise_choices, :exercise_answers).find_each do |question|
|
|
|
|
|