You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20180930063614_upgrade_thredded_v0_15_to_v0_16.rb
    path of file: ./repos/alonetone/db/migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: tr
    
  def set_messageboard_ids
    messageboard_topics = Thredded::Topic.pluck(:messageboard_id, :id).group_by(&:first)
    messageboard_topics.transform_values! { |v| v.map(&:second) }
    messageboard_topics.each do |messageboard_id, topic_ids|
      say "Setting messageboard_id #{messageboard_id} for postable_id IN (#{topic_ids.join(',')})"
      Thredded::UserTopicReadState.where(postable_id: topic_ids).update_all(messageboard_id: messageboard_id)
    end
  end