class DropMessageForForgeActivities < ActiveRecord::Migration
  def up
    forge_activities = ForgeActivity.where("forge_act_type =?", "Message")
    forge_activities.each do |fa|
      # 删除项目动态中，讨论区也会多一条记录问题
      if fa.forge_act && !fa.forge_act.parent_id.nil?
        fa.delete
      end
    end
  end

  def down
  end
end
