Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
commit
f3a25e9812
@ -0,0 +1,14 @@
|
|||||||
|
class AddShixunNameToExQuestion < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :exercise_questions, :shixun_name, :string
|
||||||
|
add_column :exercise_bank_questions, :shixun_name, :string
|
||||||
|
|
||||||
|
ExerciseQuestion.where(question_type: 5).each do |question|
|
||||||
|
question.update_column("shixun_name", question.shixun.try(:name))
|
||||||
|
end
|
||||||
|
|
||||||
|
ExerciseBankQuestion.where(question_type: 5).each do |question|
|
||||||
|
question.update_column("shixun_name", question.shixun.try(:name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue