]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
23795133cc9c7534e7125f85dcc596fb9f52c33b
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / XXXX.data.alternative-title-indexing.sql
1 BEGIN;
2
3 -- check whether patch can be applied
4 SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
5
6 UPDATE config.metabib_field
7 SET
8     xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and starts-with(@type,'alternative')]$$,
9     browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
10     browse_xpath = NULL
11 WHERE
12     field_class = 'title' AND name = 'alternative' ;
13
14 COMMIT;
15
16 \qecho This is a browse-only reingest of your bib records. It may take a while.
17 \qecho You may cancel now without losing the effect of the rest of the
18 \qecho upgrade script, and arrange the reingest later.
19 \qecho .
20 SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
21     FROM biblio.record_entry;