Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20230302123301_add_index_on_runner_machine_id_on_runner_machine_builds.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 035223382bd0cf2b12f1ac853a60fdc59c949986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class AddIndexOnRunnerMachineIdOnRunnerMachineBuilds < Gitlab::Database::Migration[2.1]
  include Gitlab::Database::PartitioningMigrationHelpers

  disable_ddl_transaction!

  INDEX_NAME = 'index_p_ci_runner_machine_builds_on_runner_machine_id'

  def up
    add_concurrent_partitioned_index :p_ci_runner_machine_builds, :runner_machine_id, unique: false, name: INDEX_NAME
  end

  def down
    remove_concurrent_partitioned_index_by_name :p_ci_runner_machine_builds, INDEX_NAME
  end
end