From f7f318d1e53ae6ed3c44d675d63786c68be813cd Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 23 Feb 2010 18:17:49 +0000 Subject: [PATCH] upgrade script for ui.staff.require_initials git-svn-id: svn://svn.open-ils.org/ILS/trunk@15625 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- ...169.data.org-setting-require-staff-initials.sql | 33 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0169.data.org-setting-require-staff-initials.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 8c6d2df43..1676b9848 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -51,7 +51,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0168'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0169'); -- phasefx CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0169.data.org-setting-require-staff-initials.sql b/Open-ILS/src/sql/Pg/upgrade/0169.data.org-setting-require-staff-initials.sql new file mode 100644 index 000000000..a73a6a3bf --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0169.data.org-setting-require-staff-initials.sql @@ -0,0 +1,33 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0169'); -- phasefx + +-- Effective undoes 0117.data.org-setting-notes-require-initials.sql +-- At the time of this script, these shouldn't be in any production systems, so I'm removing, not "upgrading". +DELETE FROM actor.org_unit_setting WHERE name IN ( + 'ui.circ_and_cat.notes.require_initials', + 'ui.circ.standing_penalty.require_initials' +); +DELETE FROM config.org_unit_setting_type WHERE name IN ( + 'ui.circ_and_cat.notes.require_initials', + 'ui.circ.standing_penalty.require_initials' +); + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) + SELECT DISTINCT + 'ui.staff.require_initials', + oils_i18n_gettext( + 'ui.staff.require_initials', + 'GUI: Require staff initials for entry/edit of item/patron/penalty notes/messages.', + 'coust', + 'label'), + oils_i18n_gettext( + 'ui.staff.require_initials', + 'Appends staff initials and edit date into note content.', + 'coust', + 'description'), + 'bool' + FROM config.org_unit_setting_type -- Since this script is way after the setting was introduced, being careful + WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'ui.staff.require_initials'); + +COMMIT; -- 2.11.0