|
|
@ -1,9 +1,9 @@
|
|
|
|
class ChangeAttachmentHistory < ActiveRecord::Migration
|
|
|
|
class ChangeAttachmentHistory < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
def up
|
|
|
|
attachments = Attachment.where("container_type =?", "Version")
|
|
|
|
# attachments = Attachment.where("container_type =?", "Version")
|
|
|
|
attachments.each do |am|
|
|
|
|
# attachments.each do |am|
|
|
|
|
am.update_attribute(:container_type, "Project") unless am.nil?
|
|
|
|
# am.update_attribute(:container_type, "Project") unless am.nil?
|
|
|
|
end
|
|
|
|
# end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def down
|
|
|
|
def down
|
|
|
|