项目课程讨论区资源公开迁移

This commit is contained in:
huang 2016-09-18 15:53:32 +08:00
parent ec8053b248
commit a3467a5697
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
class UpdateAttachPublicForMessage < ActiveRecord::Migration
def up
begin
attachments = Attachment.where(:container_type => "Message", :is_public => 0)
attachments.update_all(:is_public => 1)
rescue Exception => e
puts e
end
end
def down
end
end