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: 020_create_review_mappings.rb
    path of file: ./repos/expertiza/db/migrate
    
    the code of the file until where you have to start completion: class CreateReviewMappings < ActiveRecord::Migration[4.2]
  def self.up
    create_table 'review_mappings', force: true do |t|
      t.column 'author_id', :integer
      t.column 'team_id', :integer
      t.column 'reviewer_id', :integer
      t.column 'assignment_id', :integer
    end

    add_index 'review_mappings', ['assignment_id'], name: 'fk_review_mapping_assignments'

    execute "alter table review_mappings
               add constraint fk_review_mapping_assignments
               foreign key (assignment_id) references assignments(id)"

    add_index 'review_mappings', ['reviewer_id'], name: 'fk_review_users_reviewer'

    execute "alter table review_mappings
               add constraint fk_review_users_reviewer
               foreign key (reviewer_id) references users(id)"

    add_index 'review_mappings', ['author_id'], name: 'fk_review_users_author'

    execute "alter table review_mappings
               add constraint fk_review_users_author
               foreign key (author_id) references users(id)"

    add_index
    
  def self.up
    create_table 'review_mappings', force: true do |t|
      t.column 'author_id', :integer
      t.column 'team_id', :integer
      t.column 'reviewer_id', :integer
      t.column 'assignment_id', :integer
    end

    add_index 'review_mappings', ['assignment_id'], name: 'fk_review_mapping_assignments'

    execute "alter table review_mappings
               add constraint fk_review_mapping_assignments
               foreign key (assignment_id) references assignments(id)"

    add_index 'review_mappings', ['reviewer_id'], name: 'fk_review_users_reviewer'

    execute "alter table review_mappings
               add constraint fk_review_users_reviewer
               foreign key (reviewer_id) references users(id)"

    add_index 'review_mappings', ['author_id'], name: 'fk_review_users_author'

    execute "alter table review_mappings
               add constraint fk_review_users_author
               foreign key (author_id) references users(id)"

    add_index 'review_mappings', ['team_id'], name: 'fk_review_teams'

    execute "alter table review_mappings
               add constraint fk_review_teams
               foreign key (team_id) references teams(id)"
  end