blob: 5541afcee4036b69f299c41c58906301093f9658 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class RemoveTempIndexNullProjectNamespaceId < Gitlab::Database::Migration[2.0]
INDEX_NAME = 'tmp_index_for_null_project_namespace_id'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :projects, INDEX_NAME
end
def down
add_concurrent_index :projects, :id, name: INDEX_NAME, where: 'project_namespace_id IS NULL'
end
end
|