summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220517101119_create_confidential_notes_index_synchronously.rb
blob: 25b7fe7f7bb96aaf8e1d1511c389500a0ad77599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

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

  disable_ddl_transaction!

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

  def down
    remove_concurrent_index_by_name :notes, name: INDEX_NAME
  end
end