blob: 2ac485f8dc0f6e2b767793db3c997b463566bfd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class RestoreIndexForContributionAnalyticsEvents < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_on_events_to_improve_contribution_analytics_performance'
disable_ddl_transaction!
def up
prepare_async_index :events, %i[project_id target_type action created_at author_id id], name: INDEX_NAME
end
def down
unprepare_async_index :events, %i[project_id target_type action created_at author_id id], name: INDEX_NAME
end
end
|