|
|
@ -1,6 +1,6 @@
|
|
|
|
class MigrateExerciseUserQuestions < ActiveRecord::Migration
|
|
|
|
class MigrateExerciseUserQuestions < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
def up
|
|
|
|
exercises = Exercise.where("id > 900")
|
|
|
|
exercises = Exercise.where("id > 1000")
|
|
|
|
|
|
|
|
|
|
|
|
exercises.each do |exercise|
|
|
|
|
exercises.each do |exercise|
|
|
|
|
if exercise.exercise_level_settings.where("num != exercise_questions_count").size > 0
|
|
|
|
if exercise.exercise_level_settings.where("num != exercise_questions_count").size > 0
|
|
|
|