From: Bill Erickson Date: Tue, 4 Oct 2011 17:00:59 +0000 (-0400) Subject: Stamped upgrade script for username limit settings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3891ba9abdf39dd079472e5213e7db1407e47b8d;p=contrib%2FConifer.git Stamped upgrade script for username limit settings Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index fe76dfdea4..9004611935 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 ('0631', :eg_version); -- tsbere/dbwells +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0632', :eg_version); -- tsbere/berick CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0632.data.username-limit-settings.sql b/Open-ILS/src/sql/Pg/upgrade/0632.data.username-limit-settings.sql new file mode 100644 index 0000000000..62f70d84f1 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0632.data.username-limit-settings.sql @@ -0,0 +1,33 @@ +BEGIN; + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0632', :eg_version); + +INSERT INTO config.org_unit_setting_type (name, grp, label, description, datatype) VALUES +( 'opac.username_regex', 'glob', + oils_i18n_gettext('opac.username_regex', + 'Patron username format', + 'coust', 'label'), + oils_i18n_gettext('opac.username_regex', + 'Regular expression defining the patron username format, used for patron registration and self-service username changing only', + 'coust', 'description'), + 'string') +,( 'opac.lock_usernames', 'glob', + oils_i18n_gettext('opac.lock_usernames', + 'Lock Usernames', + 'coust', 'label'), + oils_i18n_gettext('opac.lock_usernames', + 'If enabled username changing via the OPAC will be disabled', + 'coust', 'description'), + 'bool') +,( 'opac.unlimit_usernames', 'glob', + oils_i18n_gettext('opac.unlimit_usernames', + 'Allow multiple username changes', + 'coust', 'label'), + oils_i18n_gettext('opac.unlimit_usernames', + 'If enabled (and Lock Usernames is not set) patrons will be allowed to change their username when it does not look like a barcode. Otherwise username changing in the OPAC will only be allowed when the patron''s username looks like a barcode.', + 'coust', 'description'), + 'bool') +; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.temp.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.temp.sql deleted file mode 100644 index 3e64e0be20..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.temp.sql +++ /dev/null @@ -1,26 +0,0 @@ -INSERT INTO config.org_unit_setting_type (name, grp, label, description, datatype) VALUES -( 'opac.username_regex', 'glob', - oils_i18n_gettext('opac.username_regex', - 'Patron username format', - 'coust', 'label'), - oils_i18n_gettext('opac.username_regex', - 'Regular expression defining the patron username format, used for patron registration and self-service username changing only', - 'coust', 'description'), - 'string') -,( 'opac.lock_usernames', 'glob', - oils_i18n_gettext('opac.lock_usernames', - 'Lock Usernames', - 'coust', 'label'), - oils_i18n_gettext('opac.lock_usernames', - 'If enabled username changing via the OPAC will be disabled', - 'coust', 'description'), - 'bool') -,( 'opac.unlimit_usernames', 'glob', - oils_i18n_gettext('opac.unlimit_usernames', - 'Allow multiple username changes', - 'coust', 'label'), - oils_i18n_gettext('opac.unlimit_usernames', - 'If enabled (and Lock Usernames is not set) patrons will be allowed to change their username when it does not look like a barcode. Otherwise username changing in the OPAC will only be allowed when the patron''s username looks like a barcode.', - 'coust', 'description'), - 'bool') -;