From: Lebbeous Fogle-Weekley Date: Mon, 19 Sep 2011 21:41:48 +0000 (-0400) Subject: Take care of some missed db upgrade script numbers X-Git-Tag: sprint4-merge-nov22~5084 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5568ae69ac55ab021e3a2fe0583c3ca7602b8578;p=working%2FEvergreen.git Take care of some missed db upgrade script numbers Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index fe25d5ae96..e9ef912027 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,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 ('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, diff --git a/Open-ILS/src/sql/Pg/upgrade/0625.data.opac_staff_saved_search_size.sql b/Open-ILS/src/sql/Pg/upgrade/0625.data.opac_staff_saved_search_size.sql new file mode 100644 index 0000000000..6ae7abf0e4 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0625.data.opac_staff_saved_search_size.sql @@ -0,0 +1,17 @@ +-- 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; diff --git a/Open-ILS/src/sql/Pg/upgrade/0626.schema.bookbag-goodies.sql b/Open-ILS/src/sql/Pg/upgrade/0626.schema.bookbag-goodies.sql new file mode 100644 index 0000000000..15cef3b08e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0626.schema.bookbag-goodies.sql @@ -0,0 +1,69 @@ +-- 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; diff --git a/Open-ILS/src/sql/Pg/upgrade/XYXY.data.opac_staff_saved_search_size.sql b/Open-ILS/src/sql/Pg/upgrade/XYXY.data.opac_staff_saved_search_size.sql deleted file mode 100644 index 410f1ef72b..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XYXY.data.opac_staff_saved_search_size.sql +++ /dev/null @@ -1,17 +0,0 @@ --- 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; diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bookbag-goodies.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bookbag-goodies.sql deleted file mode 100644 index df4e45687e..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bookbag-goodies.sql +++ /dev/null @@ -1,69 +0,0 @@ --- 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;