From: Galen Charlton Date: Thu, 27 Oct 2022 23:27:23 +0000 (-0400) Subject: LP#1864507: (follow-up) fix seed data and schema update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=57dfc3af76fa8caa815adb7ba1462d2befc5e203;p=working%2FEvergreen.git LP#1864507: (follow-up) fix seed data and schema update Syntax error terminated the DB update and would have left certain field without the new normalizer. 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 7cd50de78d..2ee20c8e6f 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -10984,7 +10984,7 @@ INSERT INTO config.metabib_field_index_norm_map (field,norm,pos) FROM config.metabib_field m, config.index_normalizer i WHERE i.func = 'metabib.trim_trailing_punctuation' - m.field_class='title' AND (m.browse_field OR m.facet_field OR m.display_field) + AND m.field_class='title' AND (m.browse_field OR m.facet_field OR m.display_field) AND NOT EXISTS (SELECT 1 FROM config.metabib_field_index_norm_map WHERE field = m.id AND norm = i.id); INSERT INTO config.record_attr_index_norm_map (attr,norm,pos) diff --git a/Open-ILS/src/sql/Pg/upgrade/1344.function.trim_trailing_punct-improvement.sql b/Open-ILS/src/sql/Pg/upgrade/1344.function.trim_trailing_punct-improvement.sql index 5f74889ad2..8238e34799 100644 --- a/Open-ILS/src/sql/Pg/upgrade/1344.function.trim_trailing_punct-improvement.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1344.function.trim_trailing_punct-improvement.sql @@ -59,7 +59,7 @@ INSERT INTO config.metabib_field_index_norm_map (field,norm,pos) FROM config.metabib_field m, config.index_normalizer i WHERE i.func = 'metabib.trim_trailing_punctuation' - m.field_class='title' AND (m.browse_field OR m.facet_field OR m.display_field) + AND m.field_class='title' AND (m.browse_field OR m.facet_field OR m.display_field) AND NOT EXISTS (SELECT 1 FROM config.metabib_field_index_norm_map WHERE field = m.id AND norm = i.id); COMMIT;