class ChangeActivitiesContainerType < ActiveRecord::Migration
  def up
    activities = Activity.where("activity_container_type = ''")
    activities.each do |activity|
      activity.set_container_type_val
      activity.save
    end
  end

  def down
    Activity.where("activity_container_type <> ''").update_all(activity_container_type: '',activity_container_id:nil)
  end
end