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

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

class RemoveNotesNullDiscussionIdTempIndex < Gitlab::Database::Migration[2.0]
  INDEX_NAME = 'tmp_index_notes_on_id_where_discussion_id_is_null'

  disable_ddl_transaction!

  def up
    remove_concurrent_index_by_name :notes, INDEX_NAME
  end

  def down
    add_concurrent_index :notes, :id, where: 'discussion_id IS NULL', name: INDEX_NAME
  end
end