blob: aca3ccaa03e5b9b7722205ae5756ede5063f0108 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class RemoveNamespacesIdParentIdInversePartialIndex < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
NAME = 'index_namespaces_id_parent_id_is_not_null'
def up
remove_concurrent_index :namespaces, :id, name: NAME
end
def down
add_concurrent_index :namespaces, :id, where: 'parent_id IS NOT NULL', name: NAME
end
end
|