Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20220701085523_schedule_index_on_events_for_contribution_analytics_optimization.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10be7a2596573cc32388d8ca68ce9e03cca7397c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class ScheduleIndexOnEventsForContributionAnalyticsOptimization < Gitlab::Database::Migration[2.0]
  INDEX_NAME = 'index_on_events_to_improve_contribution_analytics_performance'

  def up
    prepare_async_index :events, [:project_id, :target_type, :action, :created_at, :author_id, :id], name: INDEX_NAME
  end

  def down
    unprepare_async_index :events, INDEX_NAME
  end
end