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: 096_create_teammate_review_mappings.rb
    path of file: ./repos/expertiza/db/migrate
    
    the code of the file until where you have to start completion: class CreateTeammateReviewMappings < ActiveRecord::Migration[4.2]
  def self.up
    create_table :teammate_review_mappings do |t|
      t.column :reviewer_id, :integer, null: false
      t.column :reviewee_id, :integer, null: false

    
  def self.up
    create_table :teammate_review_mappings do |t|
      t.column :reviewer_id, :integer, null: false
      t.column :reviewee_id, :integer, null: false
      t.column :reviewed_object_id, :integer, null: false
    end

    add_column :teammate_reviews, :mapping_id, :integer, null: false
    records = ActiveRecord::Base.connection.select_all('select * from `teammate_reviews`')

    records.each do |review|
      reviewer = AssignmentParticipant.where(user_id: review['reviewer_id'], parent_id: review['assignment_id']).first
      if reviewer.nil?
        reviewer = AssignmentParticipant.create(user_id: review['reviewer_id'], parent_id: review['assignment_id'])
        reviewer.set_handle
      end
      reviewee = AssignmentParticipant.where(user_id: review['reviewer_id'], parent_id: review['assignment_id']).first
      if reviewee.nil?
        reviewee = AssignmentParticipant.create(user_id: review['reviewer_id'], parent_id: review['assignment_id'])
        reviewee.set_handle
      end