debian-mirror-gitlab/db/migrate/20220608114734_prepare_confidential_note_index_on_id.rb
2022-07-23 20:15:48 +02:00

14 lines
337 B
Ruby

# frozen_string_literal: true
class PrepareConfidentialNoteIndexOnId < Gitlab::Database::Migration[2.0]
INDEX_NAME = 'index_notes_on_id_where_confidential'
def up
prepare_async_index :notes, :id, where: 'confidential = true', name: INDEX_NAME
end
def down
unprepare_async_index :notes, :id, name: INDEX_NAME
end
end