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

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

class ImproveIndexOnEventsForCalendar < Gitlab::Database::Migration[1.0]
  INDEX_NAME = 'index_events_author_id_project_id_action_target_type_created_at'

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

  def down
    unprepare_async_index :events, [:author_id, :project_id, :action, :target_type, :created_at], name: INDEX_NAME
  end
end