Evergreen 3.11.1-3.12.0 upgrade script issue with 1395 portion

Bug #2054349 reported by Blake GH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned

Bug Description

This section:

SELECT evergreen.upgrade_deps_block_check('1395', :eg_version);

DELETE FROM actor.org_unit_setting WHERE name IN (
    'opac.did_you_mean.low_result_threshold',
    'opac.did_you_mean.max_suggestions',
    'search.symspell.keyboard_distance.weight',
    'search.symspell.min_suggestion_use_threshold',
    'search.symspell.pg_trgm.weight',
    'search.symspell.soundex.weight'
);

DELETE FROM config.org_unit_setting_type WHERE name IN (
    'opac.did_you_mean.low_result_threshold',
    'opac.did_you_mean.max_suggestions',
    'search.symspell.keyboard_distance.weight',
    'search.symspell.min_suggestion_use_threshold',
    'search.symspell.pg_trgm.weight',
    'search.symspell.soundex.weight'
);

needs to look like this:

SELECT evergreen.upgrade_deps_block_check('1395', :eg_version);

DELETE FROM actor.org_unit_setting WHERE name IN (
    'opac.did_you_mean.low_result_threshold',
    'opac.did_you_mean.max_suggestions',
    'search.symspell.keyboard_distance.weight',
    'search.symspell.min_suggestion_use_threshold',
    'search.symspell.pg_trgm.weight',
    'search.symspell.soundex.weight'
);

DELETE FROM config.org_unit_setting_type WHERE name IN (
    'opac.did_you_mean.low_result_threshold',
    'opac.did_you_mean.max_suggestions',
    'search.symspell.keyboard_distance.weight',
    'search.symspell.min_suggestion_use_threshold',
    'search.symspell.pg_trgm.weight',
    'search.symspell.soundex.weight'
);

DELETE FROM config.org_unit_setting_type_log WHERE field_name IN (
    'opac.did_you_mean.low_result_threshold',
    'opac.did_you_mean.max_suggestions',
    'search.symspell.keyboard_distance.weight',
    'search.symspell.min_suggestion_use_threshold',
    'search.symspell.pg_trgm.weight',
    'search.symspell.soundex.weight'
);

Revision history for this message
Blake GH (bmagic) wrote :
tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Confirmed that if I have changed the value of this setting, then try to run the 3.11.1-3.12 upgrade script, I get:

ERROR: insert or update on table "org_unit_setting_type_log" violates foreign key constraint "org_unit_setting_type_log_field_name_fkey"
DETAIL: Key (field_name)=(opac.did_you_mean.max_suggestions) is not present in table "org_unit_setting_type".

Confirmed that the problem goes away when using your version, Blake. Thanks for catching and fixing this!

Signedoff and merged to rel_3_12 and main.

Changed in evergreen:
status: New → Confirmed
tags: added: signedoff
Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Since this can cause an upgrade to fail, I've marked the importance as High.

Changed in evergreen:
importance: Undecided → High
milestone: none → 3.12.3
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.