blob: 94634a4cb2f976419148e80b4c320b318dc8c2a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class AddTopicsNameGinIndex < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_topics_on_name_trigram'
disable_ddl_transaction!
def up
add_concurrent_index :topics, :name, name: INDEX_NAME, using: :gin, opclass: { name: :gin_trgm_ops }
end
def down
remove_concurrent_index_by_name :topics, INDEX_NAME
end
end
|