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

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

class PrepareNotesNamespaceIdIndex < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_notes_on_namespace_id'

  # TODO: Index to be created synchronously as part of https://gitlab.com/gitlab-org/gitlab/-/issues/416127
  def up
    prepare_async_index :notes, :namespace_id, name: INDEX_NAME
  end

  def down
    unprepare_async_index :notes, :namespace_id, name: INDEX_NAME
  end
end