From 21191483697b1b54b3f6aefe7b0587b5001a70ec Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 30 Apr 2010 14:43:40 +0000 Subject: [PATCH] add table and IDL class for global flags/settings. the value column is text, may be semantically upgraded to JSON in the future git-svn-id: svn://svn.open-ils.org/ILS/trunk@16359 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 17 +++++++++++++++++ Open-ILS/src/sql/Pg/002.schema.config.sql | 7 ++++++- .../sql/Pg/upgrade/0248.schema.config.global_flag.sql | 10 ++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 67387789f..cbeebea63 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -506,6 +506,23 @@ 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 e83e99203..11152e7d3 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -55,12 +55,17 @@ INSERT INTO config.internal_flag (name) VALUES ('ingest.metarecord_mapping.skip_ INSERT INTO config.internal_flag (name) VALUES ('ingest.reingest.force_on_same_marc'); INSERT INTO config.internal_flag (name) VALUES ('ingest.reingest.skip_located_uri'); +CREATE TABLE config.global_flag ( + label TEXT NOT NULL +) INHERITS config.internal_flag; +ALTER TABLE config.global_flag ADD PRIMARY KEY (name); + CREATE TABLE config.upgrade_log ( version TEXT PRIMARY KEY, install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0247'); -- phasefx +INSERT INTO config.upgrade_log (version) VALUES ('0248'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql b/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql new file mode 100644 index 000000000..4f998fb94 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql @@ -0,0 +1,10 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0248'); -- miker + +CREATE TABLE config.global_flag ( + label TEXT NOT NULL +) INHERITS config.internal_flag; +ALTER TABLE config.global_flag ADD PRIMARY KEY (name); + +COMMIT; -- 2.11.0