nonsense instead of an obvious error).
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/0270.schema.query-xisnull-correction.sql
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16469
dcc99617-32d9-48b4-a31d-
7c20da2025e4
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0269'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0270'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
'xfld', -- field
'xfunc', -- function
'xin', -- in
- 'xisnull' -- is null
+ 'xisnull', -- is null
'xnull', -- null
'xnum', -- number
'xop', -- operator
--- /dev/null
+BEGIN;
+
+-- Create new expression type for IS [NOT] NULL
+
+INSERT INTO config.upgrade_log (version) VALUES ('0270'); -- Scott McKellar
+
+ALTER TABLE query.expression
+ DROP CONSTRAINT expression_type;
+
+ALTER TABLE query.expression
+ ADD CONSTRAINT expression_type CHECK
+ ( type IN (
+ 'xbet', -- between
+ 'xbind', -- bind variable
+ 'xbool', -- boolean
+ 'xcase', -- case
+ 'xcast', -- cast
+ 'xcol', -- column
+ 'xex', -- exists
+ 'xfld', -- field
+ 'xfunc', -- function
+ 'xin', -- in
+ 'xisnull', -- is null
+ 'xnull', -- null
+ 'xnum', -- number
+ 'xop', -- operator
+ 'xstr', -- string
+ 'xsubq' -- subquery
+ ) );
+
+COMMIT;