Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/educoder into develop
commit
8bfd3bfa98
@ -1,8 +1,8 @@
|
||||
class AddTotalDurationToWatchCourseDuration < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :watch_course_videos, :total_duration, :float, default: 0
|
||||
WatchVideoHistory.where("created_at < '2020-03-14 00:00:00'").each do |d|
|
||||
d.watch_course_video.increment!(:total_duration, d.total_duration) if d.watch_course_video.present?
|
||||
end
|
||||
#add_column :watch_course_videos, :total_duration, :float, default: 0
|
||||
#WatchVideoHistory.where("created_at < '2020-03-14 00:00:00'").each do |d|
|
||||
# d.watch_course_video.increment!(:total_duration, d.total_duration) if d.watch_course_video.present?
|
||||
#end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in new issue