[open-ils-commits] r16038 - in trunk/Open-ILS/src/sql/Pg: . upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 29 15:22:43 EDT 2010
Author: scottmk
Date: 2010-03-29 15:22:38 -0400 (Mon, 29 Mar 2010)
New Revision: 16038
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0220.schema.query.nullable-from.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/008.schema.query.sql
Log:
In query.stored query: make from_clause nullable, so that we can
represent UNION, INTERSECT, and EXCEPT queries.
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/0220.schema.query.nullable-from.sql
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-29 18:44:14 UTC (rev 16037)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-29 19:22:38 UTC (rev 16038)
@@ -60,7 +60,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0219'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0220); -- 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-03-29 18:44:14 UTC (rev 16037)
+++ trunk/Open-ILS/src/sql/Pg/008.schema.query.sql 2010-03-29 19:22:38 UTC (rev 16038)
@@ -34,9 +34,10 @@
( type IN ( 'SELECT', 'UNION', 'INTERSECT', 'EXCEPT' ) ),
use_all BOOLEAN NOT NULL DEFAULT FALSE,
use_distinct BOOLEAN NOT NULL DEFAULT FALSE,
- from_clause INT NOT NULL , --REFERENCES query.from_clause
- where_clause INT , --REFERENCES query.expression
+ from_clause INT, --REFERENCES query.from_clause
--DEFERRABLE INITIALLY DEFERRED,
+ where_clause INT, --REFERENCES query.expression
+ --DEFERRABLE INITIALLY DEFERRED,
having_clause INT --REFERENCES query.expression
--DEFERRABLE INITIALLY DEFERRED
);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0220.schema.query.nullable-from.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0220.schema.query.nullable-from.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0220.schema.query.nullable-from.sql 2010-03-29 19:22:38 UTC (rev 16038)
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0220'); -- Scott McKellar
+
+ALTER TABLE query.stored_query
+ ALTER COLUMN from_clause DROP NOT NULL;
+
+COMMIT;
+
More information about the open-ils-commits
mailing list