Skip to content

Add a column zoekt_settings in application_settings

What does this MR do and why?

Add a new column zoekt_settings of the type jsonb in the application_settings table. This jsonb column can have three attributes.

  • zoekt_indexing_enabled
  • zoekt_indexing_paused
  • zoekt_search_enabled

This column can be used to show the settings in the admin panel and eventually, few zoekt feature flags can be deprecated.

All three attributes have the default value of false. In the follow-up MRs the backfilling of this column will happen.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  • Check out the branch and run the DB migrations.
git fetch && git checkout 389765-add-zoekt_settings-in-application_settings && bin/rails db:migrate
  • Open the rails console
bin/rails c
  • Check the existing ApplicationSetting record. The value of zoekt_settings should be {}
ApplicationSetting.last.zoekt_settings
  • Check the new ApplicationSetting record. The value of zoekt_settings should be {"zoekt_indexing_enabled"=>false, "zoekt_indexing_paused"=>false, "zoekt_search_enabled"=>false}
ApplicationSetting.new.zoekt_settings

Related to #389765

#452041 (closed)

Edited by Ravi Kumar

Merge request reports