|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
class ModifyScriptAndDescriptionForShixuninfo < ActiveRecord::Migration[5.2]
|
|
|
|
|
class ModifyShixunInfoForShixuns < ActiveRecord::Migration[5.2]
|
|
|
|
|
def change
|
|
|
|
|
Shixun.find_each do |shixun|
|
|
|
|
|
if shixun.shixun_info
|
|
|
|
@ -11,6 +11,8 @@ class ModifyScriptAndDescriptionForShixuninfo < ActiveRecord::Migration[5.2]
|
|
|
|
|
evaluate_script: shixun[:evaluate_script], shixun_id: shixun.id)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
if shixun.description.present?
|
|
|
|
|
remove_columns :shixuns, :description, :propaedeutics, :evaluate_script
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|