From 6b1336ccc8eb51b0b91826b134ff0f162581681e Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 24 May 2010 20:08:20 +0000 Subject: [PATCH] add settings group table, shared between org and usr settings, for labeling groups of settings git-svn-id: svn://svn.open-ils.org/ILS/trunk@16490 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 19 +++++++++++++++++++ Open-ILS/src/sql/Pg/002.schema.config.sql | 9 ++++++++- .../sql/Pg/upgrade/0275.schema.settings_groups.sql | 17 +++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0275.schema.settings_groups.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 9501ad905b..2992e75f0a 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1964,6 +1964,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + + + @@ -1971,9 +1986,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + @@ -1993,11 +2010,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 10dfe7b99e..0b38ed82bb 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -65,7 +65,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0274'); -- Scott McKellar +INSERT INTO config.upgrade_log (version) VALUES ('0275'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, @@ -652,9 +652,15 @@ CREATE TABLE config.billing_type ( CONSTRAINT billing_type_once_per_lib UNIQUE (name, owner) ); +CREATE TABLE config.settings_group ( + name TEXT PRIMARY KEY, + label TEXT UNIQUE NOT NULL -- I18N +); + CREATE TABLE config.org_unit_setting_type ( name TEXT PRIMARY KEY, label TEXT UNIQUE NOT NULL, + grp TEXT REFERENCES config.settings_group (name), description TEXT, datatype TEXT NOT NULL DEFAULT 'string', fm_class TEXT, @@ -680,6 +686,7 @@ CREATE TABLE config.usr_setting_type ( opac_visible BOOL NOT NULL DEFAULT FALSE, label TEXT UNIQUE NOT NULL, description TEXT, + grp TEXT REFERENCES config.settings_group (name), datatype TEXT NOT NULL DEFAULT 'string', fm_class TEXT, diff --git a/Open-ILS/src/sql/Pg/upgrade/0275.schema.settings_groups.sql b/Open-ILS/src/sql/Pg/upgrade/0275.schema.settings_groups.sql new file mode 100644 index 0000000000..4244debca6 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0275.schema.settings_groups.sql @@ -0,0 +1,17 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0275'); -- miker + +CREATE TABLE config.settings_group ( + name text primary key, + label text not null unique +); + +ALTER TABLE config.org_unit_setting_type + ADD COLUMN grp TEXT REFERENCES config.settings_group (name); + +ALTER TABLE config.usr_setting_type + ADD COLUMN grp TEXT REFERENCES config.settings_group (name); + +COMMIT; + -- 2.11.0