1. Add new column date_ceiling to rule_circ_duration table.
2. New table hard_due_date.
For trunk, v1.6, v1.6.2 (eventually), and v2.1 (eventually).
NOT for v1.6.1 or v2.0.
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0432.schema.config_hard_due_date.sql
M Open-ILS/examples/fm_IDL.xml
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18207
dcc99617-32d9-48b4-a31d-
7c20da2025e4
<field name="name" reporter:datatype="text"/>
<field name="normal" reporter:datatype="interval"/>
<field name="shrt" reporter:datatype="interval"/>
+ <field name="date_ceiling" reporter:datatype="timestamp"/>
</fields>
<links>
</links>
</actions>
</permacrud>
</class>
+
+ <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
+ <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
+ <field reporter:label="ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
+ <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
+ <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
+ </fields>
+ <links>
+ <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ </permacrud>
+ </class>
+
<class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
<fields oils_persist:primary="id" oils_persist:sequence="">
<field name="balance_owed" reporter:datatype="money"/>
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0431'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0432'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
extended INTERVAL NOT NULL,
normal INTERVAL NOT NULL,
shrt INTERVAL NOT NULL,
- max_renewals INT NOT NULL
+ max_renewals INT NOT NULL,
+ date_ceiling TIMESTAMPTZ
);
COMMENT ON TABLE config.rule_circ_duration IS $$
/*
*/
$$;
+CREATE TABLE config.hard_due_date (
+ id SERIAL PRIMARY KEY,
+ duration_rule INT NOT NULL REFERENCES config.rule_circ_duration (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ ceiling_date TIMESTAMPTZ NOT NULL,
+ active_date TIMESTAMPTZ NOT NULL
+);
+
CREATE TABLE config.rule_max_fine (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL UNIQUE CHECK ( name ~ E'^\\w+$' ),
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0432'); -- Scott McKellar
+
+ALTER TABLE config.rule_circ_duration
+ ADD COLUMN date_ceiling TIMESTAMPTZ;
+
+CREATE TABLE config.hard_due_date (
+ id SERIAL PRIMARY KEY,
+ duration_rule INT NOT NULL REFERENCES config.rule_circ_duration (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ ceiling_date TIMESTAMPTZ NOT NULL,
+ active_date TIMESTAMPTZ NOT NULL
+);
+
+COMMIT;