[open-ils-commits] r16359 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 30 10:43:42 EDT 2010
Author: miker
Date: 2010-04-30 10:43:40 -0400 (Fri, 30 Apr 2010)
New Revision: 16359
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
Log:
add table and IDL class for global flags/settings. the value column is text, may be semantically upgraded to JSON in the future
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-04-30 14:40:33 UTC (rev 16358)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-04-30 14:43:40 UTC (rev 16359)
@@ -506,6 +506,23 @@
</links>
</class>
+ <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
+ <fields oils_persist:primary="name">
+ <field reporter:label="Name" name="name" reporter:datatype="text"/>
+ <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
+ <field reporter:label="Value" name="value" reporter:datatype="text"/>
+ <field reporter:label="Enabled" name="enabled" reporter:datatype="bool"/>
+ </fields>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
+ <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
+ <update permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
+ <delete permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
+
<class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
<fields oils_persist:primary="id">
<field reporter:label="ID" name="id" reporter:datatype="id"/>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-04-30 14:40:33 UTC (rev 16358)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-04-30 14:43:40 UTC (rev 16359)
@@ -55,12 +55,17 @@
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,
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql 2010-04-30 14:43:40 UTC (rev 16359)
@@ -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;
More information about the open-ils-commits
mailing list