From 57dfc3af76fa8caa815adb7ba1462d2befc5e203 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 27 Oct 2022 19:27:23 -0400 Subject: [PATCH] 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 --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +- .../sql/Pg/upgrade/1344.function.trim_trailing_punct-improvement.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.11.0