blob: eb4c413a5a9a7c89f02b1e5cdb9bc61f9d713037 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
class DisableFastupdateOnMergeRequestsTitleGinIndex < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_merge_requests_on_title_trigram'
def up
with_lock_retries do
execute <<~SQL
ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ;
SQL
end
end
def down
with_lock_retries do
execute <<~SQL
ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ;
SQL
end
end
end
|