LP#1893997: fix a couple minor thinkos in the upgrade
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 15 Mar 2021 14:37:10 +0000 (10:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 15 Mar 2021 14:55:25 +0000 (10:55 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/sql/Pg/upgrade/XXXX.schema.symspell.sql
Open-ILS/src/support-scripts/symspell-sideload.pl

index 5de9eaf..9df9f31 100644 (file)
@@ -809,30 +809,35 @@ select $z$select $y$select $y$||x.id||$y$, '$z$||x.x||$z$', count(*) from search
 \qecho '// Then, at the command line:'
 \qecho ''
 \qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl title > title.sql'
+\qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl author > author.sql'
+\qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl subject > subject.sql'
+\qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl series > series.sql'
+\qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl identifier > identifier.sql'
+\qecho '$ ~/EG-src-path/Open-ILS/src/support-scripts/symspell-sideload.pl keyword > keyword.sql'
 \qecho ''
 \qecho '// And, back in psql'
 \qecho ''
 \qecho 'ALTER TABLE search.symspell_dictionary SET UNLOGGED;'
 \qecho 'TRUNCATE search.symspell_dictionary;'
 \qecho ''
-\qecho '\i identifier.sql'
-\qecho '\i author.sql'
-\qecho '\i title.sql'
-\qecho '\i subject.sql'
-\qecho '\i series.sql'
-\qecho '\i keyword.sql'
+\qecho '\\i identifier.sql'
+\qecho '\\i author.sql'
+\qecho '\\i title.sql'
+\qecho '\\i subject.sql'
+\qecho '\\i series.sql'
+\qecho '\\i keyword.sql'
 \qecho ''
 \qecho 'CLUSTER search.symspell_dictionary USING symspell_dictionary_pkey;'
 \qecho 'REINDEX TABLE search.symspell_dictionary;'
 \qecho 'ALTER TABLE search.symspell_dictionary SET LOGGED;'
 \qecho 'VACUUM ANALYZE search.symspell_dictionary;'
 \qecho ''
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_title;'
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_author;'
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_subject;'
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_series;'
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_identifier;'
-\qecho 'DROP TABLE search.search.symspell_dictionary_partial_keyword;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_title;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_author;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_subject;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_series;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_identifier;'
+\qecho 'DROP TABLE search.symspell_dictionary_partial_keyword;'
 
 /* To run by hand:
 
@@ -892,12 +897,12 @@ REINDEX TABLE search.symspell_dictionary;
 ALTER TABLE search.symspell_dictionary SET LOGGED;
 VACUUM ANALYZE search.symspell_dictionary;
 
-DROP TABLE search.search.symspell_dictionary_partial_title;
-DROP TABLE search.search.symspell_dictionary_partial_author;
-DROP TABLE search.search.symspell_dictionary_partial_subject;
-DROP TABLE search.search.symspell_dictionary_partial_series;
-DROP TABLE search.search.symspell_dictionary_partial_identifier;
-DROP TABLE search.search.symspell_dictionary_partial_keyword;
+DROP TABLE search.symspell_dictionary_partial_title;
+DROP TABLE search.symspell_dictionary_partial_author;
+DROP TABLE search.symspell_dictionary_partial_subject;
+DROP TABLE search.symspell_dictionary_partial_series;
+DROP TABLE search.symspell_dictionary_partial_identifier;
+DROP TABLE search.symspell_dictionary_partial_keyword;
 
 */
 
index af148a8..257f28b 100755 (executable)
@@ -65,7 +65,7 @@ CREATE UNLOGGED TABLE search.symspell_dictionary_partial_$class (
     prefix_key TEXT,
     ${class}_count INT,
     ${class}_suggestions TEXT[]
-) FROM STDIN;
+);
 
 COPY search.symspell_dictionary_partial_$class FROM STDIN;
 SQL