Skip to content

Add a migration to add prefix project in wiki rid

Ravi Kumar requested to merge 336100-migration-to-add-prefix-in-wiki-rid into master

What does this MR do and why?

This MR will add the prefix project in rid in all wiki_blobs. This is needed because in the future we will support group wikis as well so we need a to differentiate the rid in project wikis and group wikis

Screenshots or screen recordings

Screenshot_2023-05-02_at_13.08.56

How to set up and validate locally

Make sure the Elasticsearch is enabled

  1. Open the Rails console
bundle exec rails c

Run the following command

require_relative 'ee/elastic/migrate/20230428500000_add_suffix_project_in_wiki_rid.rb' 
AddSuffixProjectInWikiRid.new(20230428500000).migrate
  1. Check project wikis on ES
curl -H 'Content-type: application/json' -XGET 'http://localhost:9200/gitlab-development-wikis/_search'

The rid must be like this wiki_project_#{id}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #336100 (closed)

Edited by Ravi Kumar

Merge request reports

Loading