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

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

class RemoveNamespacesIdParentIdPartialIndex < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  NAME = 'index_namespaces_id_parent_id_is_null'

  def up
    remove_concurrent_index :namespaces, :id, name: NAME
  end

  def down
    add_concurrent_index :namespaces, :id, where: 'parent_id IS NULL', name: NAME
  end
end