3 SELECT evergreen.upgrade_deps_block_check('1026', :eg_version);
5 INSERT INTO config.metabib_field ( id, field_class, name, label,
6 format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
7 (34, 'subject', 'topic_browse', oils_i18n_gettext(34, 'Topic Browse', 'cmf', 'label'),
8 'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "topic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
10 INSERT INTO config.metabib_field ( id, field_class, name, label,
11 format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
12 (35, 'subject', 'geographic_browse', oils_i18n_gettext(35, 'Geographic Name Browse', 'cmf', 'label'),
13 'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "geographic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
15 INSERT INTO config.metabib_field ( id, field_class, name, label,
16 format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
17 (36, 'subject', 'temporal_browse', oils_i18n_gettext(36, 'Temporal Term Browse', 'cmf', 'label'),
18 'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "temporal"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
20 INSERT INTO config.metabib_field_index_norm_map (field,norm)
23 FROM config.metabib_field m,
24 config.index_normalizer i
25 WHERE i.func IN ('naco_normalize')
26 AND m.id IN (34, 35, 36);
28 UPDATE config.metabib_field
29 SET browse_field = FALSE
30 WHERE field_class = 'subject' AND name = 'topic'
32 UPDATE config.metabib_field
33 SET browse_field = FALSE
34 WHERE field_class = 'subject' AND name = 'geographic'
36 UPDATE config.metabib_field
37 SET browse_field = FALSE
38 WHERE field_class = 'subject' AND name = 'temporal'
41 UPDATE authority.control_set_bib_field_metabib_field_map
42 SET metabib_field = 34
43 WHERE metabib_field = 14;
44 UPDATE authority.control_set_bib_field_metabib_field_map
45 SET metabib_field = 35
46 WHERE metabib_field = 13;
47 UPDATE authority.control_set_bib_field_metabib_field_map
48 SET metabib_field = 36
49 WHERE metabib_field = 11;
53 \qecho This is a browse-only reingest of your bib records. It may take a while.
54 \qecho You may cancel now without losing the effect of the rest of the
55 \qecho upgrade script, and arrange the reingest later.
57 SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
58 FROM biblio.record_entry;