From: Ben Shum Date: Thu, 10 Jul 2014 18:51:57 +0000 (-0400) Subject: LP#1210161: Stamping upgrade script to rename bookbag to list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4836d0b5f28316cf1802e437588103334523dfaa;p=evergreen%2Fpines.git LP#1210161: Stamping upgrade script to rename bookbag to list Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e03ec5515b..9e5641b4e5 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -91,7 +91,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 ('0883', :eg_version); -- miker/bshum +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0884', :eg_version); -- rsteed/bshum CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0884.data.rename_bookbag_to_mylist.sql b/Open-ILS/src/sql/Pg/upgrade/0884.data.rename_bookbag_to_mylist.sql new file mode 100644 index 0000000000..0589bc31c4 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0884.data.rename_bookbag_to_mylist.sql @@ -0,0 +1,73 @@ +BEGIN; +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0884', :eg_version); + +UPDATE container.biblio_record_entry_bucket_type +SET label = oils_i18n_gettext( + 'bookbag', + 'Book List', + 'cbrebt', + 'label' +) WHERE code = 'bookbag'; + +UPDATE container.user_bucket_type +SET label = oils_i18n_gettext( + 'folks:pub_book_bags.view', + 'List Published Book Lists', + 'cubt', + 'label' +) WHERE code = 'folks:pub_book_bags.view'; + +UPDATE container.user_bucket_type +SET label = oils_i18n_gettext( + 'folks:pub_book_bags.add', + 'Add to Published Book Lists', + 'cubt', + 'label' +) WHERE code = 'folks:pub_book_bags.add'; + +UPDATE action_trigger.hook +SET description = oils_i18n_gettext( + 'container.biblio_record_entry_bucket.csv', + 'Produce a CSV file representing a book list', + 'ath', + 'description' +) WHERE key = 'container.biblio_record_entry_bucket.csv'; + +UPDATE action_trigger.reactor +SET description = oils_i18n_gettext( + 'ContainerCSV', + 'Facilitates producing a CSV file representing a book list by introducing an "items" variable into the TT environment, sorted as dictated according to user params', + 'atr', + 'description' +) +WHERE module = 'ContainerCSV'; + +UPDATE action_trigger.event_definition +SET template = REPLACE(template, 'bookbag', 'book list'), +name = 'Book List CSV' +WHERE name = 'Bookbag CSV'; + +UPDATE config.org_unit_setting_type +SET description = oils_i18n_gettext( + 'opac.patron.temporary_list_warn', + 'Present a warning dialog to the patron when a patron adds a book to a temporary book list.', + 'coust', + 'description' +) WHERE name = 'opac.patron.temporary_list_warn'; + +UPDATE config.usr_setting_type +SET label = oils_i18n_gettext( + 'opac.default_list', + 'Default list to use when adding to a list', + 'cust', + 'label' +), +description = oils_i18n_gettext( + 'opac.default_list', + 'Default list to use when adding to a list', + 'cust', + 'description' +) WHERE name = 'opac.default_list'; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.rename_bookbag_to_mylist.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.rename_bookbag_to_mylist.sql deleted file mode 100644 index 4eeb22bba3..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.rename_bookbag_to_mylist.sql +++ /dev/null @@ -1,73 +0,0 @@ -BEGIN; --- check whether patch can be applied --- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -UPDATE container.biblio_record_entry_bucket_type -SET label = oils_i18n_gettext( - 'bookbag', - 'Book List', - 'cbrebt', - 'label' -) WHERE code = 'bookbag'; - -UPDATE container.user_bucket_type -SET label = oils_i18n_gettext( - 'folks:pub_book_bags.view', - 'List Published Book Lists', - 'cubt', - 'label' -) WHERE code = 'folks:pub_book_bags.view'; - -UPDATE container.user_bucket_type -SET label = oils_i18n_gettext( - 'folks:pub_book_bags.add', - 'Add to Published Book Lists', - 'cubt', - 'label' -) WHERE code = 'folks:pub_book_bags.add'; - -UPDATE action_trigger.hook -SET description = oils_i18n_gettext( - 'container.biblio_record_entry_bucket.csv', - 'Produce a CSV file representing a book list', - 'ath', - 'description' -) WHERE key = 'container.biblio_record_entry_bucket.csv'; - -UPDATE action_trigger.reactor -SET description = oils_i18n_gettext( - 'ContainerCSV', - 'Facilitates producing a CSV file representing a book list by introducing an "items" variable into the TT environment, sorted as dictated according to user params', - 'atr', - 'description' -) -WHERE module = 'ContainerCSV'; - -UPDATE action_trigger.event_definition -SET template = REPLACE(template, 'bookbag', 'book list'), -name = 'Book List CSV' -WHERE name = 'Bookbag CSV'; - -UPDATE config.org_unit_setting_type -SET description = oils_i18n_gettext( - 'opac.patron.temporary_list_warn', - 'Present a warning dialog to the patron when a patron adds a book to a temporary book list.', - 'coust', - 'description' -) WHERE name = 'opac.patron.temporary_list_warn'; - -UPDATE config.usr_setting_type -SET label = oils_i18n_gettext( - 'opac.default_list', - 'Default list to use when adding to a list', - 'cust', - 'label' -), -description = oils_i18n_gettext( - 'opac.default_list', - 'Default list to use when adding to a list', - 'cust', - 'description' -) WHERE name = 'opac.default_list'; - -COMMIT;