迁移问题

This commit is contained in:
huang 2016-01-08 18:55:17 +08:00
parent d7994c42c1
commit 580e4d7327
1 changed files with 4 additions and 4 deletions

View File

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