From: scottmk Date: Tue, 11 May 2010 19:53:25 +0000 (+0000) Subject: Add "label" column to query.bind_variable X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8bdd208c5f4a62e3e844a56c90c2081f8c38762b;p=evergreen%2Fbjwebb.git 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@16416 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 3f61007c0..bafa1ef3c 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6581,9 +6581,11 @@ 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 432719a02..18ca5ba31 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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, diff --git a/Open-ILS/src/sql/Pg/008.schema.query.sql b/Open-ILS/src/sql/Pg/008.schema.query.sql index 67494977f..60a667d1e 100644 --- a/Open-ILS/src/sql/Pg/008.schema.query.sql +++ b/Open-ILS/src/sql/Pg/008.schema.query.sql @@ -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 index 000000000..d3968dcd8 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0257.schema.query-bind-var-label.sql @@ -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;