blob: b461e656f1faf66d3abf42de4bf9cc7e7f47b4dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# frozen_string_literal: true
class AddIndexForColumnsUserCustomAttribute < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_key_updated_at_on_user_custom_attribute'
def up
add_concurrent_index(:user_custom_attributes, [:key, :updated_at], name: INDEX_NAME)
end
def down
remove_concurrent_index_by_name(:user_custom_attributes, INDEX_NAME)
end
end
|