Reinstate ElasticsearchSettingsFromApplicationSettings migration
Background
Revert MR: Revert ElasticsearchSettingsFromApplicationSett... (!176987 - merged)
Original MR: Consolidate Elasticsearch application settings ... (!174172 - merged)
The ElasticsearchSettingsFromApplicationSettings post deploy migration was reverted and needs to be reinstated.
Proposal
The solution must follow the process of ignoring columns for one milestone before dropping them. There were issues with adding ignore column while moving to the same name columns in jsonb. Two options are:
- Keep column names the same and apply
ignore_columns. Fix whatever issues are caused by it - Change the
elasticsearchjsonb column names. Migrate all data to the names. Addignore_columnsfor the deprecated columns AND theelasticsearch_*jsonb fields. And remove all in the following milestone.
NOTE: for option 2 - I wrote up the plan to be extra safe due to rails schema cache. The jsonb fields may not be affected by rails schema cache if a key name changes (we should check with database team)
Final plan
We will follow the dropping columns approach as we confirm it works.
-
%17.9 Ignoring the column !177568 (merged) -
%17.10 Dropping the column !181660 (merged) -
%17.11 Removing the ignore rule !184940 (merged)
Edited by Arturo Herrero