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

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

class DropUniqueNamespacesIndexOnNameAndParentId < Gitlab::Database::Migration[1.0]
  INDEX_NAME = 'index_namespaces_on_name_and_parent_id'

  disable_ddl_transaction!

  def up
    remove_concurrent_index_by_name :namespaces, INDEX_NAME
  end

  def down
    add_concurrent_index :namespaces, [:name, :parent_id], unique: true, name: INDEX_NAME
  end
end