]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0432.schema.config_hard_due_date.sql
LP#1564079 Checkout history skips nonexistent items
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0432.schema.config_hard_due_date.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0432'); -- Scott McKellar
4
5 ALTER TABLE config.rule_circ_duration
6         ADD COLUMN date_ceiling TIMESTAMPTZ;
7
8 CREATE TABLE config.hard_due_date (
9         id              SERIAL      PRIMARY KEY,
10         duration_rule   INT         NOT NULL REFERENCES config.rule_circ_duration (id)
11                                     DEFERRABLE INITIALLY DEFERRED,
12         ceiling_date    TIMESTAMPTZ NOT NULL,
13         active_date     TIMESTAMPTZ NOT NULL
14 );
15
16 COMMIT;