|
|
|
@ -17,5 +17,12 @@ namespace :schools do
|
|
|
|
|
|
|
|
|
|
# 改变课堂的学校id
|
|
|
|
|
Course.where(school_id: merge_schools).update_all(school_id: f_school)
|
|
|
|
|
|
|
|
|
|
# 实训报告表迁移数据
|
|
|
|
|
s_report = SchoolReport.find_by(school_id: f_school)
|
|
|
|
|
SchoolReport.where(school_id: merge_schools).each do |sr|
|
|
|
|
|
s_report.update_column(:shixun_evaluate_count, shixun_evaluate_count+sr.shixun_evaluate_count)
|
|
|
|
|
sr.update(shixun_evaluate_count: 0)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|