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: 20220720185043_index_good_job_jobs_on_finished_at.rb
    path of file: ./repos/identity-idp/db/worker_jobs_migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
class IndexGoodJobJobsOnFinishedAt < ActiveRecord::Migration[6.1]
  disable_ddl_transaction!

  def change
    reversible do |dir|
      dir.up do
        # Ensure this incremental update migration is idempotent
        # with monolithic install migration.
        return if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id)
      end
    end

    add_index :good_jobs,
              [:active_job_id],
              name: :index_
    
  def change
    reversible do |dir|
      dir.up do
        # Ensure this incremental update migration is idempotent
        # with monolithic install migration.
        return if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id)
      end
    end

    add_index :good_jobs,
              [:active_job_id],
              name: :index_good_jobs_on_active_job_id,
              algorithm: :concurrently

    add_index :good_jobs,
              [:finished_at],
              where: "retried_good_job_id IS NULL AND finished_at IS NOT NULL",
              name: :index_good_jobs_jobs_on_finished_at,
              algorithm: :concurrently
  end