1 --Upgrade Script for 3.7.1 to 3.7.2
2 \set eg_version '''3.7.2'''
4 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.7.2', :eg_version);
6 SELECT evergreen.upgrade_deps_block_check('1266', :eg_version);
8 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
10 'eg.grid.catalog.record.copies', 'gui', 'object',
12 'eg.grid.catalog.record.copies',
13 'Grid Config: eg.grid.catalog.record.copies',
18 SELECT evergreen.upgrade_deps_block_check('1268', :eg_version);
20 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
22 'eg.staff.catalog.results.show_more', 'gui', 'bool',
24 'eg.staff.catalog.results.show_more',
25 'Show more details in Angular staff catalog',
31 SELECT evergreen.upgrade_deps_block_check('1269', :eg_version);
36 WHERE code IN ('VIEW_BOOKING_RESERVATION', 'VIEW_BOOKING_RESERVATION_ATTR_MAP'))
38 INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
39 SELECT grp, perms_to_add.id as perm, depth, grantable
41 permission.grp_perm_map
43 --- Don't add the permissions if they have already been assigned
45 (SELECT DISTINCT grp FROM permission.grp_perm_map
46 INNER JOIN perms_to_add ON perm=perms_to_add.id)
48 --- Anybody who can view resources should also see reservations
52 FROM permission.perm_list
53 WHERE code = 'VIEW_BOOKING_RESOURCE'
58 SELECT evergreen.upgrade_deps_block_check('1270', :eg_version);
60 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'BKS', 39, 1, ' ');
61 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'COM', 39, 1, ' ');
62 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'MAP', 39, 1, ' ');
63 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'MIX', 39, 1, ' ');
64 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'REC', 39, 1, ' ');
65 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'SCO', 39, 1, ' ');
66 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'SER', 39, 1, ' ');
67 INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Srce', '008', 'VIS', 39, 1, ' ');
70 INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('srce','Srce','Srce');
72 INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
73 (1750, 'srce', ' ', oils_i18n_gettext('1750', 'National bibliographic agency', 'ccvm', 'value')),
74 (1751, 'srce', 'c', oils_i18n_gettext('1751', 'Cooperative cataloging program', 'ccvm', 'value')),
75 (1752, 'srce', 'd', oils_i18n_gettext('1752', 'Other', 'ccvm', 'value'));
78 SELECT evergreen.upgrade_deps_block_check('1272', :eg_version);
83 PERFORM FROM config.usr_setting_type WHERE name = 'circ.collections.exempt';
87 INSERT INTO config.usr_setting_type (
95 'circ.collections.exempt',
98 'circ.collections.exempt',
99 'Collections: Exempt',
104 'circ.collections.exempt',
105 'User is exempt from collections tracking/processing',
119 SELECT evergreen.upgrade_deps_block_check('1273', :eg_version);
121 INSERT into config.org_unit_setting_type
122 ( name, grp, label, description, datatype )
123 SELECT 'opac.did_you_mean.max_suggestions',
125 'Maximum number of spelling suggestions that may be offered',
126 'If set to -1, provide "best" suggestion if mispelled; if set higher than 0, the maximum suggestions that can be provided; if set to 0, disable suggestions.',
128 WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'opac.did_you_mean.max_suggestions');
132 SELECT evergreen.upgrade_deps_block_check('1279', :eg_version);
134 UPDATE config.org_unit_setting_type SET fm_class='cnal', datatype='link' WHERE name='ui.patron.default_inet_access_level';
138 SELECT evergreen.upgrade_deps_block_check('1282', :eg_version);
140 CREATE OR REPLACE FUNCTION search.symspell_lookup(
143 verbosity integer DEFAULT 2,
144 xfer_case boolean DEFAULT false,
145 count_threshold integer DEFAULT 1,
146 soundex_weight integer DEFAULT 0,
147 pg_trgm_weight integer DEFAULT 0,
148 kbdist_weight integer DEFAULT 0
149 ) RETURNS SETOF search.symspell_lookup_output
157 edit_list TEXT[] := '{}';
158 seen_list TEXT[] := '{}';
159 output search.symspell_lookup_output;
160 output_list search.symspell_lookup_output[];
168 smallest_ed INT := -1;
173 SELECT value::INT INTO prefix_length FROM config.internal_flag WHERE name = 'symspell.prefix_length' AND enabled;
174 prefix_length := COALESCE(prefix_length, 6);
176 SELECT value::INT INTO maxED FROM config.internal_flag WHERE name = 'symspell.max_edit_distance' AND enabled;
177 maxED := COALESCE(maxED, 3);
179 word_list := ARRAY_AGG(x) FROM search.symspell_parse_words(raw_input) x;
181 -- Common case exact match test for preformance
182 IF verbosity = 0 AND CARDINALITY(word_list) = 1 AND CHARACTER_LENGTH(word_list[1]) <= prefix_length THEN
184 'SELECT '||search_class||'_suggestions AS suggestions,
185 '||search_class||'_count AS count,
187 FROM search.symspell_dictionary
188 WHERE prefix_key = $1
189 AND '||search_class||'_count >= $2
190 AND '||search_class||'_suggestions @> ARRAY[$1]'
191 INTO entry USING evergreen.lowercase(word_list[1]), COALESCE(count_threshold,1);
192 IF entry.prefix_key IS NOT NULL THEN
193 output.lev_distance := 0; -- definitionally
194 output.prefix_key := entry.prefix_key;
195 output.prefix_key_count := entry.count;
196 output.suggestion_count := entry.count;
197 output.input := word_list[1];
199 output.suggestion := search.symspell_transfer_casing(output.input, entry.prefix_key);
201 output.suggestion := entry.prefix_key;
203 output.norm_input := entry.prefix_key;
204 output.qwerty_kb_match := 1;
205 output.pg_trgm_sim := 1;
206 output.soundex_sim := 1;
213 FOREACH word IN ARRAY word_list LOOP
215 input := evergreen.lowercase(word);
216 i_len := CHARACTER_LENGTH(input);
219 IF CHARACTER_LENGTH(input) > prefix_length THEN
220 prefix_key := SUBSTRING(input FROM 1 FOR prefix_length);
221 edit_list := ARRAY[input,prefix_key] || search.symspell_generate_edits(prefix_key, 1, l_maxED);
223 edit_list := input || search.symspell_generate_edits(input, 1, l_maxED);
226 SELECT ARRAY_AGG(x ORDER BY CHARACTER_LENGTH(x) DESC) INTO edit_list FROM UNNEST(edit_list) x;
233 FOREACH entry_key IN ARRAY edit_list LOOP
235 IF global_ed IS NOT NULL THEN
236 smallest_ed := global_ed;
240 'SELECT '||search_class||'_suggestions AS suggestions,
241 '||search_class||'_count AS count,
243 FROM search.symspell_dictionary
244 WHERE prefix_key = $1
245 AND '||search_class||'_suggestions IS NOT NULL'
251 ARRAY[s, evergreen.levenshtein_damerau_edistance(input,s,l_maxED)::TEXT]
252 ORDER BY evergreen.levenshtein_damerau_edistance(input,s,l_maxED) DESC
256 FROM UNNEST(entry.suggestions) s
257 WHERE (ABS(CHARACTER_LENGTH(s) - i_len) <= maxEd AND evergreen.levenshtein_damerau_edistance(input,s,l_maxED) BETWEEN 0 AND l_maxED)
258 AND NOT seen_list @> ARRAY[s];
260 CONTINUE WHEN good_suggs IS NULL;
262 FOR sugg, output.suggestion_count IN EXECUTE
263 'SELECT prefix_key, '||search_class||'_count
264 FROM search.symspell_dictionary
265 WHERE prefix_key = ANY ($1)
266 AND '||search_class||'_count >= $2'
267 USING AKEYS(good_suggs), COALESCE(count_threshold,1)
270 output.lev_distance := good_suggs->sugg;
271 seen_list := seen_list || sugg;
273 -- Track the smallest edit distance among suggestions from this prefix key.
274 IF smallest_ed = -1 OR output.lev_distance < smallest_ed THEN
275 smallest_ed := output.lev_distance;
278 -- Track the smallest edit distance for all prefix keys for this word.
279 IF global_ed IS NULL OR smallest_ed < global_ed THEN
280 global_ed = smallest_ed;
281 -- And if low verbosity, ignore suggs with a larger distance from here on.
282 IF verbosity <= 1 THEN
283 l_maxED := global_ed;
287 -- Lev distance is our main similarity measure. While
288 -- trgm or soundex similarity could be the main filter,
289 -- Lev is both language agnostic and faster.
291 -- Here we will skip suggestions that have a longer edit distance
292 -- than the shortest we've already found. This is simply an
293 -- optimization that allows us to avoid further processing
294 -- of this entry. It would be filtered out later.
295 CONTINUE WHEN output.lev_distance > global_ed AND verbosity <= 1;
297 -- If we have an exact match on the suggestion key we can also avoid
298 -- some function calls.
299 IF output.lev_distance = 0 THEN
300 output.qwerty_kb_match := 1;
301 output.pg_trgm_sim := 1;
302 output.soundex_sim := 1;
304 IF kbdist_weight THEN
305 output.qwerty_kb_match := evergreen.qwerty_keyboard_distance_match(input, sugg);
307 output.qwerty_kb_match := 0;
309 IF pg_trgm_weight THEN
310 output.pg_trgm_sim := similarity(input, sugg);
312 output.pg_trgm_sim := 0;
314 IF soundex_weight THEN
315 output.soundex_sim := difference(input, sugg) / 4.0;
317 output.soundex_sim := 0;
321 -- Fill in some fields
322 IF xfer_case AND input <> word THEN
323 output.suggestion := search.symspell_transfer_casing(word, sugg);
325 output.suggestion := sugg;
327 output.prefix_key := entry.prefix_key;
328 output.prefix_key_count := entry.count;
329 output.input := word;
330 output.norm_input := input;
331 output.word_pos := w_pos;
333 -- We can't "cache" a set of generated records directly, so
334 -- here we build up an array of search.symspell_lookup_output
335 -- records that we can revivicate later as a table using UNNEST().
336 output_list := output_list || output;
338 EXIT entry_key_loop WHEN smallest_ed = 0 AND verbosity = 0; -- exact match early exit
339 CONTINUE entry_key_loop WHEN smallest_ed = 0 AND verbosity = 1; -- exact match early jump to the next key
341 END LOOP; -- loop over suggestions
342 END LOOP; -- loop over entries
343 END LOOP; -- loop over entry_keys
345 -- Now we're done examining this word
346 IF verbosity = 0 THEN
347 -- Return the "best" suggestion from the smallest edit
348 -- distance group. We define best based on the weighting
349 -- of the non-lev similarity measures and use the suggestion
350 -- use count to break ties.
352 SELECT * FROM UNNEST(output_list)
353 ORDER BY lev_distance,
354 (soundex_sim * COALESCE(soundex_weight,0))
355 + (pg_trgm_sim * COALESCE(pg_trgm_weight,0))
356 + (qwerty_kb_match * COALESCE(kbdist_weight,0)) DESC,
357 suggestion_count DESC
359 ELSIF verbosity = 1 THEN
360 -- Return all suggestions from the smallest
361 -- edit distance group.
363 SELECT * FROM UNNEST(output_list) WHERE lev_distance = smallest_ed
364 ORDER BY (soundex_sim * COALESCE(soundex_weight,0))
365 + (pg_trgm_sim * COALESCE(pg_trgm_weight,0))
366 + (qwerty_kb_match * COALESCE(kbdist_weight,0)) DESC,
367 suggestion_count DESC;
368 ELSIF verbosity = 2 THEN
369 -- Return everything we find, along with relevant stats
371 SELECT * FROM UNNEST(output_list)
372 ORDER BY lev_distance,
373 (soundex_sim * COALESCE(soundex_weight,0))
374 + (pg_trgm_sim * COALESCE(pg_trgm_weight,0))
375 + (qwerty_kb_match * COALESCE(kbdist_weight,0)) DESC,
376 suggestion_count DESC;
377 ELSIF verbosity = 3 THEN
378 -- Return everything we find from the two smallest edit distance groups
380 SELECT * FROM UNNEST(output_list)
381 WHERE lev_distance IN (SELECT DISTINCT lev_distance FROM UNNEST(output_list) ORDER BY 1 LIMIT 2)
382 ORDER BY lev_distance,
383 (soundex_sim * COALESCE(soundex_weight,0))
384 + (pg_trgm_sim * COALESCE(pg_trgm_weight,0))
385 + (qwerty_kb_match * COALESCE(kbdist_weight,0)) DESC,
386 suggestion_count DESC;
387 ELSIF verbosity = 4 THEN
388 -- Return everything we find from the two smallest edit distance groups that are NOT 0 distance
390 SELECT * FROM UNNEST(output_list)
391 WHERE lev_distance IN (SELECT DISTINCT lev_distance FROM UNNEST(output_list) WHERE lev_distance > 0 ORDER BY 1 LIMIT 2)
392 ORDER BY lev_distance,
393 (soundex_sim * COALESCE(soundex_weight,0))
394 + (pg_trgm_sim * COALESCE(pg_trgm_weight,0))
395 + (qwerty_kb_match * COALESCE(kbdist_weight,0)) DESC,
396 suggestion_count DESC;
398 END LOOP; -- loop over words
404 SELECT evergreen.upgrade_deps_block_check('1283', :eg_version); -- rhamby/ehardy/jboyer
406 UPDATE asset.call_number SET record = -1 WHERE id = -1 AND record != -1;
408 CREATE RULE protect_bre_id_neg1 AS ON UPDATE TO biblio.record_entry WHERE OLD.id = -1 DO INSTEAD NOTHING;
409 CREATE RULE protect_acl_id_1 AS ON UPDATE TO asset.copy_location WHERE OLD.id = 1 DO INSTEAD NOTHING;
410 CREATE RULE protect_acn_id_neg1 AS ON UPDATE TO asset.call_number WHERE OLD.id = -1 DO INSTEAD NOTHING;
412 CREATE OR REPLACE FUNCTION asset.merge_record_assets( target_record BIGINT, source_record BIGINT ) RETURNS INT AS $func$
414 moved_objects INT := 0;
415 source_cn asset.call_number%ROWTYPE;
416 target_cn asset.call_number%ROWTYPE;
417 metarec metabib.metarecord%ROWTYPE;
418 hold action.hold_request%ROWTYPE;
419 ser_rec serial.record_entry%ROWTYPE;
420 ser_sub serial.subscription%ROWTYPE;
421 acq_lineitem acq.lineitem%ROWTYPE;
422 acq_request acq.user_request%ROWTYPE;
423 booking booking.resource_type%ROWTYPE;
424 source_part biblio.monograph_part%ROWTYPE;
425 target_part biblio.monograph_part%ROWTYPE;
426 multi_home biblio.peer_bib_copy_map%ROWTYPE;
433 -- we don't merge bib -1
434 IF target_record = -1 OR source_record = -1 THEN
438 -- move any 856 entries on records that have at least one MARC-mapped URI entry
439 SELECT INTO uri_count COUNT(*)
440 FROM asset.uri_call_number_map m
441 JOIN asset.call_number cn ON (m.call_number = cn.id)
442 WHERE cn.record = source_record;
444 IF uri_count > 0 THEN
446 -- This returns more nodes than you might expect:
447 -- 7 instead of 1 for an 856 with $u $y $9
448 SELECT COUNT(*) INTO counter
449 FROM oils_xpath_table(
452 'biblio.record_entry',
454 'id=' || source_record
455 ) as t(i int,c text);
457 FOR i IN 1 .. counter LOOP
458 SELECT '<datafield xmlns="http://www.loc.gov/MARC21/slim"' ||
460 ' ind1="' || FIRST(ind1) || '"' ||
461 ' ind2="' || FIRST(ind2) || '">' ||
463 '<subfield code="' || subfield || '">' ||
466 regexp_replace(data,'&','&','g'),
470 ) || '</subfield>', ''
471 ) || '</datafield>' INTO uri_datafield
472 FROM oils_xpath_table(
475 'biblio.record_entry',
476 '//*[@tag="856"][position()=' || i || ']/@ind1|' ||
477 '//*[@tag="856"][position()=' || i || ']/@ind2|' ||
478 '//*[@tag="856"][position()=' || i || ']/*/@code|' ||
479 '//*[@tag="856"][position()=' || i || ']/*[@code]',
480 'id=' || source_record
481 ) as t(id int,ind1 text, ind2 text,subfield text,data text);
483 -- As most of the results will be NULL, protect against NULLifying
484 -- the valid content that we do generate
485 uri_text := uri_text || COALESCE(uri_datafield, '');
488 IF uri_text <> '' THEN
489 UPDATE biblio.record_entry
490 SET marc = regexp_replace(marc,'(</[^>]*record>)', uri_text || E'\\1')
491 WHERE id = target_record;
496 -- Find and move metarecords to the target record
497 SELECT INTO metarec *
498 FROM metabib.metarecord
499 WHERE master_record = source_record;
502 UPDATE metabib.metarecord
503 SET master_record = target_record,
505 WHERE id = metarec.id;
507 moved_objects := moved_objects + 1;
510 -- Find call numbers attached to the source ...
511 FOR source_cn IN SELECT * FROM asset.call_number WHERE record = source_record LOOP
513 SELECT INTO target_cn *
514 FROM asset.call_number
515 WHERE label = source_cn.label
516 AND prefix = source_cn.prefix
517 AND suffix = source_cn.suffix
518 AND owning_lib = source_cn.owning_lib
519 AND record = target_record
522 -- ... and if there's a conflicting one on the target ...
525 -- ... move the copies to that, and ...
527 SET call_number = target_cn.id
528 WHERE call_number = source_cn.id;
530 -- ... move V holds to the move-target call number
531 FOR hold IN SELECT * FROM action.hold_request WHERE target = source_cn.id AND hold_type = 'V' LOOP
533 UPDATE action.hold_request
534 SET target = target_cn.id
537 moved_objects := moved_objects + 1;
540 UPDATE asset.call_number SET deleted = TRUE WHERE id = source_cn.id;
544 -- ... just move the call number to the target record
545 UPDATE asset.call_number
546 SET record = target_record
547 WHERE id = source_cn.id;
550 moved_objects := moved_objects + 1;
553 -- Find T holds targeting the source record ...
554 FOR hold IN SELECT * FROM action.hold_request WHERE target = source_record AND hold_type = 'T' LOOP
556 -- ... and move them to the target record
557 UPDATE action.hold_request
558 SET target = target_record
561 moved_objects := moved_objects + 1;
564 -- Find serial records targeting the source record ...
565 FOR ser_rec IN SELECT * FROM serial.record_entry WHERE record = source_record LOOP
566 -- ... and move them to the target record
567 UPDATE serial.record_entry
568 SET record = target_record
569 WHERE id = ser_rec.id;
571 moved_objects := moved_objects + 1;
574 -- Find serial subscriptions targeting the source record ...
575 FOR ser_sub IN SELECT * FROM serial.subscription WHERE record_entry = source_record LOOP
576 -- ... and move them to the target record
577 UPDATE serial.subscription
578 SET record_entry = target_record
579 WHERE id = ser_sub.id;
581 moved_objects := moved_objects + 1;
584 -- Find booking resource types targeting the source record ...
585 FOR booking IN SELECT * FROM booking.resource_type WHERE record = source_record LOOP
586 -- ... and move them to the target record
587 UPDATE booking.resource_type
588 SET record = target_record
589 WHERE id = booking.id;
591 moved_objects := moved_objects + 1;
594 -- Find acq lineitems targeting the source record ...
595 FOR acq_lineitem IN SELECT * FROM acq.lineitem WHERE eg_bib_id = source_record LOOP
596 -- ... and move them to the target record
598 SET eg_bib_id = target_record
599 WHERE id = acq_lineitem.id;
601 moved_objects := moved_objects + 1;
604 -- Find acq user purchase requests targeting the source record ...
605 FOR acq_request IN SELECT * FROM acq.user_request WHERE eg_bib = source_record LOOP
606 -- ... and move them to the target record
607 UPDATE acq.user_request
608 SET eg_bib = target_record
609 WHERE id = acq_request.id;
611 moved_objects := moved_objects + 1;
614 -- Find parts attached to the source ...
615 FOR source_part IN SELECT * FROM biblio.monograph_part WHERE record = source_record LOOP
617 SELECT INTO target_part *
618 FROM biblio.monograph_part
619 WHERE label = source_part.label
620 AND record = target_record;
622 -- ... and if there's a conflicting one on the target ...
625 -- ... move the copy-part maps to that, and ...
626 UPDATE asset.copy_part_map
627 SET part = target_part.id
628 WHERE part = source_part.id;
630 -- ... move P holds to the move-target part
631 FOR hold IN SELECT * FROM action.hold_request WHERE target = source_part.id AND hold_type = 'P' LOOP
633 UPDATE action.hold_request
634 SET target = target_part.id
637 moved_objects := moved_objects + 1;
642 -- ... just move the part to the target record
643 UPDATE biblio.monograph_part
644 SET record = target_record
645 WHERE id = source_part.id;
648 moved_objects := moved_objects + 1;
651 -- Find multi_home items attached to the source ...
652 FOR multi_home IN SELECT * FROM biblio.peer_bib_copy_map WHERE peer_record = source_record LOOP
653 -- ... and move them to the target record
654 UPDATE biblio.peer_bib_copy_map
655 SET peer_record = target_record
656 WHERE id = multi_home.id;
658 moved_objects := moved_objects + 1;
661 -- And delete mappings where the item's home bib was merged with the peer bib
662 DELETE FROM biblio.peer_bib_copy_map WHERE peer_record = (
663 SELECT (SELECT record FROM asset.call_number WHERE id = call_number)
664 FROM asset.copy WHERE id = target_copy
667 -- Apply merge tracking
668 UPDATE biblio.record_entry
669 SET merge_date = NOW() WHERE id = target_record;
671 UPDATE biblio.record_entry
672 SET merge_date = NOW(), merged_to = target_record
673 WHERE id = source_record;
675 -- replace book bag entries of source_record with target_record
676 UPDATE container.biblio_record_entry_bucket_item
677 SET target_biblio_record_entry = target_record
678 WHERE bucket IN (SELECT id FROM container.biblio_record_entry_bucket WHERE btype = 'bookbag')
679 AND target_biblio_record_entry = source_record;
681 -- Finally, "delete" the source record
682 UPDATE biblio.record_entry SET active = FALSE WHERE id = source_record;
683 DELETE FROM biblio.record_entry WHERE id = source_record;
685 -- That's all, folks!
686 RETURN moved_objects;
688 $func$ LANGUAGE plpgsql;
693 SELECT evergreen.upgrade_deps_block_check('1294', :eg_version); -- mmorgan / tlittle / JBoyer
695 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
697 'eg.grid.admin.local.container.carousel_org_unit', 'gui', 'object',
699 'eg.grid.admin.local.container.carousel_org_unit',
700 'Grid Config: eg.grid.admin.local.container.carousel_org_unit',
704 'eg.grid.admin.container.carousel', 'gui', 'object',
706 'eg.grid.admin.container.carousel',
707 'Grid Config: eg.grid.admin.container.carousel',
711 'eg.grid.admin.server.config.carousel_type', 'gui', 'object',
713 'eg.grid.admin.server.config.carousel_type',
714 'Grid Config: eg.grid.admin.server.config.carousel_type',
720 SELECT evergreen.upgrade_deps_block_check('1302', :eg_version);
722 UPDATE config.org_unit_setting_type
723 SET description = oils_i18n_gettext(
724 'ui.circ.items_out.longoverdue',
725 'Value is a numeric code, describing: A. In which tab ("Items Checked Out", '||
726 'or "Other/Special Circulations") the circulation '||
727 'should appear while checked out, and B. Whether the circulation should '||
728 'continue to appear in the "Other" tab when checked in with '||
729 'outstanding fines. '||
730 '1 = (A) "Items", (B) "Other". 2 = (A) "Other", (B) "Other". ' ||
731 '5 = (A) "Items", (B) do not display. 6 = (A) "Other", (B) do not display.',
735 WHERE name = 'ui.circ.items_out.longoverdue';
737 UPDATE config.org_unit_setting_type
738 set description = oils_i18n_gettext(
739 'ui.circ.items_out.lost',
740 'Value is a numeric code, describing: A. In which tab ("Items Checked Out", '||
741 'or "Other/Special Circulations") the circulation '||
742 'should appear while checked out, and B. Whether the circulation should '||
743 'continue to appear in the "Other" tab when checked in with '||
744 'outstanding fines. '||
745 '1 = (A) "Items", (B) "Other". 2 = (A) "Other", (B) "Other". ' ||
746 '5 = (A) "Items", (B) do not display. 6 = (A) "Other", (B) do not display.',
750 WHERE name = 'ui.circ.items_out.lost';
752 UPDATE config.org_unit_setting_type
753 set description = oils_i18n_gettext(
754 'ui.circ.items_out.claimsreturned',
755 'Value is a numeric code, describing: A. In which tab ("Items Checked Out", '||
756 'or "Other/Special Circulations") the circulation '||
757 'should appear while checked out, and B. Whether the circulation should '||
758 'continue to appear in the "Other" tab when checked in with '||
759 'outstanding fines. '||
760 '1 = (A) "Items", (B) "Other". 2 = (A) "Other", (B) "Other". ' ||
761 '5 = (A) "Items", (B) do not display. 6 = (A) "Other", (B) do not display.',
765 WHERE name = 'ui.circ.items_out.claimsreturned';
768 SELECT evergreen.upgrade_deps_block_check('1303', :eg_version);
770 DROP INDEX authority.authority_full_rec_value_index;
771 CREATE INDEX authority_full_rec_value_index ON authority.full_rec (SUBSTRING(value FOR 1024));
773 DROP INDEX authority.authority_full_rec_value_tpo_index;
774 CREATE INDEX authority_full_rec_value_tpo_index ON authority.full_rec (SUBSTRING(value FOR 1024) text_pattern_ops);
779 -- Update auditor tables to catch changes to source tables.
780 -- Can be removed/skipped if there were no schema changes.
781 SELECT auditor.update_auditors();