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

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

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

  INDEX_NAME = 'index_group_group_links_on_shared_with_group_and_group_access'
  TABLE_NAME = :group_group_links

  def up
    add_concurrent_index TABLE_NAME, [:shared_with_group_id, :group_access], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME
  end
end