Add "label" column to query.bind_variable
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 11 May 2010 19:53:25 +0000 (19:53 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 11 May 2010 19:53:25 +0000 (19:53 +0000)
M    Open-ILS/src/sql/Pg/002.schema.config.sql
M    Open-ILS/src/sql/Pg/008.schema.query.sql
A    Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16416 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/008.schema.query.sql
Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql [new file with mode: 0644]

index 3f61007..bafa1ef 100644 (file)
@@ -6581,9 +6581,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
        <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
                <fields oils_persist:primary="name">
                        <field reporter:label="Name" name="name" reporter:datatype="id"/>
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
                        <field reporter:label="Type" name="type" reporter:datatype="text"/>
                        <field reporter:label="Description" name="description" reporter:datatype="text"/>
                        <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
+                       <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
                </fields>
                <links>
                </links>
index 432719a..18ca5ba 100644 (file)
@@ -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 ('0256'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0257'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 6749497..60a667d 100644 (file)
@@ -116,7 +116,8 @@ CREATE TABLE query.bind_variable (
                                           CONSTRAINT bind_variable_type CHECK
                                           ( type in ( 'string', 'number', 'string_list', 'number_list' )),
        description   TEXT             NOT NULL,
-       default_value TEXT             -- to be encoded in JSON
+       default_value TEXT,            -- to be encoded in JSON
+       label         TEXT             NOT NULL
 );
 
 CREATE TABLE query.expression (
diff --git a/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql b/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql
new file mode 100644 (file)
index 0000000..d3968dc
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0257'); -- Scott McKellar
+
+-- In the unlikely event that this table already has rows in it, it will
+-- be necessary to add the column as nullable, populate it in the existing
+-- rows, and then add the NOT NULL constraint.
+
+ALTER TABLE query.bind_variable
+       ADD COLUMN label TEXT NOT NULL;
+
+COMMIT;