debian-mirror-gitlab/db/post_migrate/20220503114353_prepare_confidential_note_index.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
344 B
Ruby
Raw Normal View History

2022-07-16 23:28:13 +05:30
# 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