Commit 61ec9cd9 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by João Alexandre Cunha

Add temp index for notes without discussion_id

This will be used for the background migration to backfill these rows

Changelog: other
parent 2632100a
# frozen_string_literal: true
class AddNotesNullDiscussionIdTempIndexAsync < Gitlab::Database::Migration[1.0]
# Temporary index to be removed in 15.0 https://gitlab.com/gitlab-org/gitlab/-/issues/357581
INDEX_NAME = 'tmp_index_notes_on_id_where_discussion_id_is_null'
def up
prepare_async_index :notes, :id, where: 'discussion_id IS NULL', name: INDEX_NAME
end
def down
unprepare_async_index_by_name :notes, INDEX_NAME
end
end
507f2d64f0810938aba75f993bb7d6216499a754652b0b4c0ee2d0d44fdc3af3
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment