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

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

class AddIndexToIssues < Gitlab::Database::Migration[1.0]
  DOWNTIME = false

  disable_ddl_transaction!

  INDEX_NAME = 'index_issues_on_id_and_weight'

  def up
    add_concurrent_index :issues, [:id, :weight], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :issues, INDEX_NAME
  end
end