Create temporary index for BackfillEventsTargetTypeForProjects synchronously

See 'target_type' parameter for Events API is nil f... (&19098 - closed) for context

Currently, project events are created without a set target_type and target_id. This is causing a problem with our Events RESP API as the target_type filter always gives an empty result for project.

After Set `events.target_type` to `project` when crea... (#565786 - closed) has been completed. We now need to backfill the existing records.

Implementation Guide

  1. Ensure Prepare temporary index for `BackfillEventsTarg... (#565787 - closed) has been completed
  2. Verify that the index exists in production
  3. Add a migration to create the index synchronously

This index will be used for Create `BackfillEventsTargetTypeForProjects` ba... (#565788 - closed)

See https://docs.gitlab.com/development/database/adding_database_indexes/#add-a-migration-to-create-the-index-synchronously for more info

Edited by Shane Maglangit