From: Mike Rylander Date: Mon, 7 Jun 2021 20:39:34 +0000 (-0400) Subject: LP#1931167: Missing YAOUS for DYM X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=78b145e3dea2df4b59e9fc52af6e88a0768fcfc4;p=Evergreen.git LP#1931167: Missing YAOUS for DYM The baseline schema did not get updated to include the opac.did_you_mean.max_suggestions YAOUS, so fresh, rather than upgraded, Evergreen installs will be missing it. This commit adds it to the baseline and provides an upgrade script to give the setting to impacted instances. Signed-off-by: Mike Rylander Signed-off-by: Erica Rohlfs Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 9549b5d029..0946e4875c 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -21621,6 +21621,20 @@ INSERT INTO config.internal_flag (name, value, enabled) VALUES ('symspell.max_ed INSERT into config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES +( 'opac.did_you_mean.max_suggestions', 'opac', + oils_i18n_gettext( + 'opac.did_you_mean.max_suggestions', + 'Maximum number of spelling suggestions that may be offered', + 'coust', 'label'), + oils_i18n_gettext( + 'opac.did_you_mean.max_suggestions', + 'If set to -1, provide "best" suggestion if mispelled; if set higher than 0, the maximum suggestions that can be provided; if set to 0, disable suggestions.', + 'coust', 'description'), + 'integer' ); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype ) +VALUES ( 'opac.did_you_mean.low_result_threshold', 'opac', oils_i18n_gettext( 'opac.did_you_mean.low_result_threshold', diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.DYM_max_suggestions.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.DYM_max_suggestions.sql new file mode 100644 index 0000000000..021daf249f --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.DYM_max_suggestions.sql @@ -0,0 +1,15 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype ) +SELECT 'opac.did_you_mean.max_suggestions', + 'opac', + 'Maximum number of spelling suggestions that may be offered', + 'If set to -1, provide "best" suggestion if mispelled; if set higher than 0, the maximum suggestions that can be provided; if set to 0, disable suggestions.', + 'integer' + WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'opac.did_you_mean.max_suggestions'); + +COMMIT; +