]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0270.schema.query-xisnull-correction.sql
Add default Vandelay match set to schema
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0270.schema.query-xisnull-correction.sql
1 BEGIN;
2
3 -- Create new expression type for IS [NOT] NULL
4
5 INSERT INTO config.upgrade_log (version) VALUES ('0270'); -- Scott McKellar
6
7 ALTER TABLE query.expression
8         DROP CONSTRAINT expression_type;
9
10 ALTER TABLE query.expression
11         ADD CONSTRAINT expression_type CHECK
12     ( type IN (
13                 'xbet',    -- between
14                 'xbind',   -- bind variable
15                 'xbool',   -- boolean
16                 'xcase',   -- case
17                 'xcast',   -- cast
18                 'xcol',    -- column
19                 'xex',     -- exists
20                 'xfld',    -- field
21                 'xfunc',   -- function
22                 'xin',     -- in
23                 'xisnull', -- is null
24                 'xnull',   -- null
25                 'xnum',    -- number
26                 'xop',     -- operator
27                 'xstr',    -- string
28                 'xsubq'    -- subquery
29         ) );
30
31 COMMIT;