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: 20230811211544_backfill_alert_management_prometheus_integrations.rb
    path of file: ./repos/gitlabhq/db/post_migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Migrate Integrations::Prometheus records to 'alert_mana
    
  def up
    each_batch_range(:project_alerting_settings, of: BATCH_SIZE) do |min, max|
      execute <<~SQL
        INSERT INTO alert_management_http_integrations (
          project_id,
          encrypted_token,
          encrypted_token_iv,
          active,
          name,
          endpoint_identifier,
          type_identifier,
          created_at,
          updated_at
        ) SELECT
          project_alerting_settings.project_id,
          project_alerting_settings.encrypted_token,
          project_alerting_settings.encrypted_token_iv,
          COALESCE(integrations.active, FALSE),
          'Prometheus',
          'legacy-prometheus',
          1, --type_identifiers { http: 0, prometheus: 1 }
          CURRENT_TIMESTAMP,
          CURRENT_TIMESTAMP
        FROM project_alerting_settings
        LEFT JOIN integrations
        ON project_alerting_settings.project_id = integrations.project_id
        AND integrations.type_new = 'Integrations::Prometheus'
        WHERE project_alerting_settings.project_id BETWEEN #{min} AND #{max}
        ON CONFLICT DO NOTHING
      SQL
    end
  end