From 35bd72f79f38ec39ecdfb1ff9e5fb6b85dc28a36 Mon Sep 17 00:00:00 2001 From: scottmk Date: Mon, 10 May 2010 14:52:05 +0000 Subject: [PATCH] Add table 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/0254.schema.query-bind-variable.sql M Open-ILS/examples/fm_IDL.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@16409 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 13 +++++++++++++ Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/008.schema.query.sql | 9 +++++++++ .../src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql | 14 ++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 18a9991301..1b01838250 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6578,6 +6578,19 @@ 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 ac7e79884b..0981b7893a 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 ('0253'); -- Scott McKellar +INSERT INTO config.upgrade_log (version) VALUES ('0254'); -- 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 aa22e0a539..cfa921e520 100644 --- a/Open-ILS/src/sql/Pg/008.schema.query.sql +++ b/Open-ILS/src/sql/Pg/008.schema.query.sql @@ -110,6 +110,15 @@ CREATE TABLE query.function_param_def ( CONSTRAINT qfpd_function_param_seq UNIQUE (function_id, seq_no) ); +CREATE TABLE query.bind_variable ( + name TEXT PRIMARY KEY, + type TEXT NOT NULL + 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 +); + CREATE TABLE query.expression ( id SERIAL PRIMARY KEY, type TEXT NOT NULL CONSTRAINT predicate_type CHECK diff --git a/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql b/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql new file mode 100644 index 0000000000..051889b8c1 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0254.schema.query-bind-variable.sql @@ -0,0 +1,14 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0254'); -- Scott McKellar + +CREATE TABLE query.bind_variable ( + name TEXT PRIMARY KEY, + type TEXT NOT NULL + 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 +); + +COMMIT; -- 2.11.0