blob: e09b5f8d93be73ee5b9ca2cc04bcf4af0de3469a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class AddIssuesAuthorizationIndex < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'idx_open_issues_on_project_and_confidential_and_author_and_id'
def up
prepare_async_index :issues, [:project_id, :confidential, :author_id, :id], name: INDEX_NAME, where: 'state_id = 1'
end
def down
unprepare_async_index :issues, INDEX_NAME
end
end
|