Stamping upgrade script for series title normalizer improvement
authorMike Rylander <mrylander@gmail.com>
Thu, 22 Aug 2013 15:26:20 +0000 (11:26 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 22 Aug 2013 15:26:20 +0000 (11:26 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0820.data.series_normalizer.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/xxxx.data.series_normalizer.sql [deleted file]

index 61ea65b..62e2edd 100644 (file)
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0819', :eg_version); -- phasefx/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0820', :eg_version); -- callender/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0820.data.series_normalizer.sql b/Open-ILS/src/sql/Pg/upgrade/0820.data.series_normalizer.sql
new file mode 100644 (file)
index 0000000..12e9e1d
--- /dev/null
@@ -0,0 +1,28 @@
+BEGIN;
+
+-- Remove [ and ] characters from seriestitle.
+-- Those characters don't play well when searching.
+
+SELECT evergreen.upgrade_deps_block_check('0820', :eg_version); -- Callender
+
+INSERT INTO config.metabib_field_index_norm_map (field,norm,params, pos)
+     SELECT  m.id,
+             i.id,
+             $$["]",""]$$,
+             '-1'
+       FROM  config.metabib_field m,
+             config.index_normalizer i
+       WHERE i.func IN ('replace')
+             AND m.id IN (1);
+             
+INSERT INTO config.metabib_field_index_norm_map (field,norm,params, pos)
+     SELECT  m.id,
+             i.id,
+             $$["[",""]$$,
+             '-1'
+       FROM  config.metabib_field m,
+             config.index_normalizer i
+       WHERE i.func IN ('replace')
+             AND m.id IN (1);
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.data.series_normalizer.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.series_normalizer.sql
deleted file mode 100644 (file)
index 1249a63..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-BEGIN;
-
--- Remove [ and ] characters from seriestitle.
--- Those characters don't play well when searching.
-
-SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version); -- Callender
-
-INSERT INTO config.metabib_field_index_norm_map (field,norm,params, pos)
-     SELECT  m.id,
-             i.id,
-             $$["]",""]$$,
-             '-1'
-       FROM  config.metabib_field m,
-             config.index_normalizer i
-       WHERE i.func IN ('replace')
-             AND m.id IN (1);
-             
-INSERT INTO config.metabib_field_index_norm_map (field,norm,params, pos)
-     SELECT  m.id,
-             i.id,
-             $$["[",""]$$,
-             '-1'
-       FROM  config.metabib_field m,
-             config.index_normalizer i
-       WHERE i.func IN ('replace')
-             AND m.id IN (1);
-
-COMMIT;