blob: c4d3de6c172284b69c512ce10a3efd6780332d4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
class IndexOrgIdOnProjects < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
INDEX_NAME = 'index_projects_on_organization_id'
def up
# rubocop:disable Migration/PreventIndexCreation
add_concurrent_index :projects, :organization_id, name: INDEX_NAME
# rubocop:enable Migration/PreventIndexCreation
end
def down
remove_concurrent_index_by_name :projects, INDEX_NAME
end
end
|