Qstore: support LIMIT and OFFSET clauses.
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0336.schema.query-limit-offset-fkey.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0336'); -- Scott McKellar
4
5 ALTER TABLE query.stored_query
6     ADD FOREIGN KEY ( limit_count )
7     REFERENCES query.expression( id )
8     DEFERRABLE INITIALLY DEFERRED;
9
10 ALTER TABLE query.stored_query
11     ADD FOREIGN KEY ( offset_count )
12     REFERENCES query.expression( id )
13     DEFERRABLE INITIALLY DEFERRED;
14
15 COMMIT;