[open-ils-commits] r16416 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 11 15:53:30 EDT 2010
Author: scottmk
Date: 2010-05-11 15:53:25 -0400 (Tue, 11 May 2010)
New Revision: 16416
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
Log:
Add "label" column to query.bind_variable
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
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-05-10 22:26:20 UTC (rev 16415)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-05-11 19:53:25 UTC (rev 16416)
@@ -6581,9 +6581,11 @@
<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>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-05-10 22:26:20 UTC (rev 16415)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-05-11 19:53:25 UTC (rev 16416)
@@ -65,7 +65,7 @@
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,
Modified: trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/008.schema.query.sql 2010-05-10 22:26:20 UTC (rev 16415)
+++ trunk/Open-ILS/src/sql/Pg/008.schema.query.sql 2010-05-11 19:53:25 UTC (rev 16416)
@@ -116,7 +116,8 @@
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 (
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql 2010-05-11 19:53:25 UTC (rev 16416)
@@ -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;
More information about the open-ils-commits
mailing list