dev_tj
cxt 5 years ago
parent 0a49a9a919
commit 29161608b1

@ -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|

Loading…
Cancel
Save