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 ('0624', :eg_version); -- miker / tsbere
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0626', :eg_version); -- senator
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+-- Evergreen DB patch 0625.data.opac_staff_saved_search_size.sql
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0625', :eg_version);
+
+INSERT into config.org_unit_setting_type (name, grp, label, description, datatype)
+VALUES (
+ 'opac.staff_saved_search.size', 'opac',
+ oils_i18n_gettext('opac.staff_saved_search.size',
+ 'OPAC: Number of staff client saved searches to display on left side of results and record details pages', 'coust', 'label'),
+ oils_i18n_gettext('opac.staff_saved_search.size',
+ 'If unset, the OPAC (only when wrapped in the staff client!) will default to showing you your ten most recent searches on the left side of the results and record details pages. If you actually don''t want to see this feature at all, set this value to zero at the top of your organizational tree.', 'coust', 'description'),
+ 'integer'
+);
+
+COMMIT;
--- /dev/null
+-- Evergreen DB patch 0626.schema.bookbag-goodies.sql
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0626', :eg_version);
+
+ALTER TABLE container.biblio_record_entry_bucket
+ ADD COLUMN description TEXT;
+
+ALTER TABLE container.call_number_bucket
+ ADD COLUMN description TEXT;
+
+ALTER TABLE container.copy_bucket
+ ADD COLUMN description TEXT;
+
+ALTER TABLE container.user_bucket
+ ADD COLUMN description TEXT;
+
+INSERT INTO action_trigger.hook (key, core_type, description, passive)
+VALUES (
+ 'container.biblio_record_entry_bucket.csv',
+ 'cbreb',
+ oils_i18n_gettext(
+ 'container.biblio_record_entry_bucket.csv',
+ 'Produce a CSV file representing a bookbag',
+ 'ath',
+ 'description'
+ ),
+ FALSE
+);
+
+INSERT INTO action_trigger.reactor (module, description)
+VALUES (
+ 'ContainerCSV',
+ oils_i18n_gettext(
+ 'ContainerCSV',
+ 'Facilitates produce a CSV file representing a bookbag by introducing an "items" variable into the TT environment, sorted as dictated according to user params',
+ 'atr',
+ 'description'
+ )
+);
+
+INSERT INTO action_trigger.event_definition (
+ id, active, owner,
+ name, hook, reactor,
+ validator, template
+) VALUES (
+ 48, TRUE, 1,
+ 'Bookbag CSV', 'container.biblio_record_entry_bucket.csv', 'ContainerCSV',
+ 'NOOP_True',
+$$
+[%-
+# target is the bookbag itself. The 'items' variable does not need to be in
+# the environment because a special reactor will take care of filling it in.
+
+FOR item IN items;
+ bibxml = helpers.xml_doc(item.target_biblio_record_entry.marc);
+ title = "";
+ FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
+ title = title _ part.textContent;
+ END;
+ author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+
+ helpers.csv_datum(title) %],[% helpers.csv_datum(author) %],[% FOR note IN item.notes; helpers.csv_datum(note.note); ","; END; "\n";
+END -%]
+$$
+);
+
+COMMIT;
+++ /dev/null
--- Evergreen DB patch XYXY.data.opac_staff_saved_search_size.sql
-
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XYXY', :eg_version);
-
-INSERT into config.org_unit_setting_type (name, grp, label, description, datatype)
-VALUES (
- 'opac.staff_saved_search.size', 'opac',
- oils_i18n_gettext('opac.staff_saved_search.size',
- 'OPAC: Number of staff client saved searches to display on left side of results and record details pages', 'coust', 'label'),
- oils_i18n_gettext('opac.staff_saved_search.size',
- 'If unset, the OPAC (only when wrapped in the staff client!) will default to showing you your ten most recent searches on the left side of the results and record details pages. If you actually don''t want to see this feature at all, set this value to zero at the top of your organizational tree.', 'coust', 'description'),
- 'integer'
-);
-
-COMMIT;
+++ /dev/null
--- Evergreen DB patch YYYY.schema.bookbag-goodies.sql
-
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('YYYY', :eg_version);
-
-ALTER TABLE container.biblio_record_entry_bucket
- ADD COLUMN description TEXT;
-
-ALTER TABLE container.call_number_bucket
- ADD COLUMN description TEXT;
-
-ALTER TABLE container.copy_bucket
- ADD COLUMN description TEXT;
-
-ALTER TABLE container.user_bucket
- ADD COLUMN description TEXT;
-
-INSERT INTO action_trigger.hook (key, core_type, description, passive)
-VALUES (
- 'container.biblio_record_entry_bucket.csv',
- 'cbreb',
- oils_i18n_gettext(
- 'container.biblio_record_entry_bucket.csv',
- 'Produce a CSV file representing a bookbag',
- 'ath',
- 'description'
- ),
- FALSE
-);
-
-INSERT INTO action_trigger.reactor (module, description)
-VALUES (
- 'ContainerCSV',
- oils_i18n_gettext(
- 'ContainerCSV',
- 'Facilitates produce a CSV file representing a bookbag by introducing an "items" variable into the TT environment, sorted as dictated according to user params',
- 'atr',
- 'description'
- )
-);
-
-INSERT INTO action_trigger.event_definition (
- id, active, owner,
- name, hook, reactor,
- validator, template
-) VALUES (
- 48, TRUE, 1,
- 'Bookbag CSV', 'container.biblio_record_entry_bucket.csv', 'ContainerCSV',
- 'NOOP_True',
-$$
-[%-
-# target is the bookbag itself. The 'items' variable does not need to be in
-# the environment because a special reactor will take care of filling it in.
-
-FOR item IN items;
- bibxml = helpers.xml_doc(item.target_biblio_record_entry.marc);
- title = "";
- FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
- title = title _ part.textContent;
- END;
- author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
-
- helpers.csv_datum(title) %],[% helpers.csv_datum(author) %],[% FOR note IN item.notes; helpers.csv_datum(note.note); ","; END; "\n";
-END -%]
-$$
-);
-
-COMMIT;