blob: 4d7cdc000d56a46223757c8936237c403da0c77c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
class RemoveIndexEventsOnProjectIdAndIdDescOnMergedAction < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_events_on_project_id_and_id_desc_on_merged_action'
disable_ddl_transaction!
def up
remove_concurrent_index(:events, [:project_id, :id], order: { id: :desc },
where: "action = 7", name: INDEX_NAME)
end
def down
add_concurrent_index(:events, [:project_id, :id], order: { id: :desc },
where: "action = 7", name: INDEX_NAME)
end
end
|