blob: 96fbab1e2eafa0cc21e3832daba2189b4ca2cc69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
class AddIndexOnNamespaceIdAndIdToProjects < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :projects, [:namespace_id, :id]
remove_concurrent_index :projects, :namespace_id
end
def down
add_concurrent_index :projects, :namespace_id
remove_concurrent_index :projects, [:namespace_id, :id]
end
end
|