add table and IDL class for global flags/settings. the value column is text, may...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 30 Apr 2010 14:43:40 +0000 (14:43 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 30 Apr 2010 14:43:40 +0000 (14:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16359 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0248.schema.config.global_flag.sql [new file with mode: 0644]

index 6738778..cbeebea 100644 (file)
@@ -506,6 +506,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </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"/>
index e83e992..11152e7 100644 (file)
@@ -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 (file)
index 0000000..4f998fb
--- /dev/null
@@ -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;