Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20221227100751_add_user_index_to_chat_names.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7be671b2cbd895f05e7cc6b9d5057a4238044372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AddUserIndexToChatNames < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  INDEX_NAME = 'index_chat_names_on_user_id'

  def up
    add_concurrent_index(:chat_names, :user_id, name: INDEX_NAME)
  end

  def down
    remove_concurrent_index_by_name(:chat_names, name: INDEX_NAME)
  end
end