blob: c006098fafd07a691767b493a3e55e931a7b0473 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# rubocop:disable RemoveIndex
class AddIndexToCiBuildsForStatusRunnerIdAndType < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :ci_builds, [:status, :type, :runner_id]
end
def down
if index_exists?(:ci_builds, [:status, :type, :runner_id])
remove_index :ci_builds, column: [:status, :type, :runner_id]
end
end
end
|