blob: 1c8b6cdd3a3b67a0b72d7f5b4a8f594697bd40c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class PrepareIndexIssuesOnProjectHealthStatusDescWorkItemType < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_issues_on_project_health_status_desc_work_item_type'
def up
prepare_async_index :issues,
[:project_id, :health_status, :id, :state_id, :work_item_type_id],
order: { health_status: 'DESC NULLS LAST', id: :desc },
name: INDEX_NAME
end
def down
unprepare_async_index :issues, INDEX_NAME
end
end
|