This commit is contained in:
parent
a38c68a791
commit
fb5e59093a
|
@ -1,5 +1,6 @@
|
||||||
class AddAttachmentsToCourses < ActiveRecord::Migration
|
class AddAttachmentsToCourses < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
|
=begin
|
||||||
Course.where(:id => CourseActivity.where("updated_at > '2017-06-01 00:00:00'").map(&:course_id).uniq).each do |course|
|
Course.where(:id => CourseActivity.where("updated_at > '2017-06-01 00:00:00'").map(&:course_id).uniq).each do |course|
|
||||||
attachments = Attachment.where(:container_type => 'Course', :container_id => course.syllabus.courses.map(&:id))
|
attachments = Attachment.where(:container_type => 'Course', :container_id => course.syllabus.courses.map(&:id))
|
||||||
attachments.each do |attachment|
|
attachments.each do |attachment|
|
||||||
|
@ -33,5 +34,6 @@ class AddAttachmentsToCourses < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
=end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
6100
db/schema.rb
6100
db/schema.rb
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue