summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220503114353_prepare_confidential_note_index.rb
blob: 08e60f3d9357aabd5af9d60f7057252ab2c64017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class PrepareConfidentialNoteIndex < Gitlab::Database::Migration[2.0]
  INDEX_NAME = 'index_notes_on_confidential'

  def up
    prepare_async_index :notes, :confidential, where: 'confidential = true', name: INDEX_NAME
  end

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