[open-ils-commits] r16469 - in trunk/Open-ILS/src/sql/Pg: . upgrade (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 21 09:04:18 EDT 2010


Author: scottmk
Date: 2010-05-21 09:04:16 -0400 (Fri, 21 May 2010)
New Revision: 16469

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0270.schema.query-xisnull-correction.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
Log:
Fixing a typo in the previous changeset (a missing comma that led to
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


Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-05-21 13:02:19 UTC (rev 16468)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-05-21 13:04:16 UTC (rev 16469)
@@ -65,7 +65,7 @@
     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,

Modified: trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/008.schema.query.sql	2010-05-21 13:02:19 UTC (rev 16468)
+++ trunk/Open-ILS/src/sql/Pg/008.schema.query.sql	2010-05-21 13:04:16 UTC (rev 16469)
@@ -134,7 +134,7 @@
 									'xfld',    -- field
 									'xfunc',   -- function
 									'xin',     -- in
-									'xisnull'  -- is null
+									'xisnull', -- is null
 	                             	'xnull',   -- null
 									'xnum',    -- number
 									'xop',     -- operator

Added: trunk/Open-ILS/src/sql/Pg/upgrade/0270.schema.query-xisnull-correction.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0270.schema.query-xisnull-correction.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0270.schema.query-xisnull-correction.sql	2010-05-21 13:04:16 UTC (rev 16469)
@@ -0,0 +1,31 @@
+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;



More information about the open-ils-commits mailing list