From ba6ffe0fe4140cc6761f2a9fff65e38649b8925c Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 10 Jun 2011 16:40:46 -0400 Subject: [PATCH] add the patron opt-in settings Signed-off-by: Jason Etheridge --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 14 +++++++- .../upgrade/0550.data.patron_opt_in_settings.sql | 40 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0550.data.patron_opt_in_settings.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 7b34e6628e..9b5bffb362 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 ('0549', :eg_version); -- phasefx/berick +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0550', :eg_version); -- phasefx/jamesrf CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index e07160a3a1..35651d2aba 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -2730,7 +2730,19 @@ INSERT into config.org_unit_setting_type ( 'opac.fully_compressed_serial_holdings', oils_i18n_gettext('opac.fully_compressed_serial_holdings', 'OPAC: Use fully compressed serial holdings', 'coust', 'label'), oils_i18n_gettext('opac.fully_compressed_serial_holdings', 'Show fully compressed serial holdings for all libraries at and below the current context unit', 'coust', 'description'), - 'bool') + 'bool'), + +( 'org.patron_opt_boundary', + oils_i18n_gettext( 'org.patron_opt_boundary', 'Circ: Patron Opt-In Boundary', 'coust', 'label'), + oils_i18n_gettext( 'org.patron_opt_boundary', 'This determines at which depth above which patrons must be opted in, and below which patrons will be assumed to be opted in.', 'coust', 'label'), + 'integer'), + +( 'org.patron_opt_default', + oils_i18n_gettext( 'org.patron_opt_default', 'Circ: Patron Opt-In Default', 'coust', 'label'), + oils_i18n_gettext( 'org.patron_opt_default', 'This is the default depth at which a patron is opted in; it is calculated as an org unit relative to the current workstation.', 'coust', 'label'), + 'integer'); + +COMMIT; ; UPDATE config.org_unit_setting_type diff --git a/Open-ILS/src/sql/Pg/upgrade/0550.data.patron_opt_in_settings.sql b/Open-ILS/src/sql/Pg/upgrade/0550.data.patron_opt_in_settings.sql new file mode 100644 index 0000000000..58a41696d5 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0550.data.patron_opt_in_settings.sql @@ -0,0 +1,40 @@ +BEGIN; + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0550', :eg_version); + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( + 'org.patron_opt_boundary', + oils_i18n_gettext( + 'org.patron_opt_boundary', + 'Circ: Patron Opt-In Boundary', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'org.patron_opt_boundary', + 'This determines at which depth above which patrons must be opted in, and below which patrons will be assumed to be opted in.', + 'coust', + 'label' + ), + 'integer' +); + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( + 'org.patron_opt_default', + oils_i18n_gettext( + 'org.patron_opt_default', + 'Circ: Patron Opt-In Default', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'org.patron_opt_default', + 'This is the default depth at which a patron is opted in; it is calculated as an org unit relative to the current workstation.', + 'coust', + 'label' + ), + 'integer' +); + +COMMIT; -- 2.11.0