LP#1931167: Missing YAOUS for DYM
authorMike Rylander <mrylander@gmail.com>
Mon, 7 Jun 2021 20:39:34 +0000 (16:39 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 12 Aug 2021 15:16:30 +0000 (11:16 -0400)
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 <mrylander@gmail.com>
Signed-off-by: Erica Rohlfs <erica.rohlfs@equinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.DYM_max_suggestions.sql [new file with mode: 0644]

index 9549b5d..0946e48 100644 (file)
@@ -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 (file)
index 0000000..021daf2
--- /dev/null
@@ -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;
+