circ.holds.default_estimated_wait_interval
circ.holds.min_estimated_wait_interval
...with corresponding tweaks to label and description.
Also: change datatype from 'integer' to 'interval'.
For any existing rows in actor.org_unit_setting, pointing to the old
setting type: update them to point to circ.holds.default_estimated_wait_interval.
(Due to a foreign key constraint, the latter update has to happen in the same
transaction as the rename of the old row.)
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0274.data.org-setting-type-est-wait.sql
M Open-ILS/src/sql/Pg/950.data.seed-values.sql
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16489
dcc99617-32d9-48b4-a31d-
7c20da2025e4
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0273'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0274'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
'Amount of time to wait before changing an item from "reshelving" status to "available". Examples "1 day", "6 hours"',
'interval' ),
-( 'circ.hold_estimate_wait_interval',
- 'Holds: Estimated Wait (Days)',
- 'When predicting the amount of time a patron will be waiting for a hold to be fulfilled, this is the default/average number of days to assume an item will be checked out.',
- 'integer' ),
+( 'circ.holds.default_estimated_wait_interval',
+ 'Holds: Default Estimated Wait',
+ 'When predicting the amount of time a patron will be waiting for a hold to be fulfilled, this is the default estimated length of time to assume an item will be checked out.',
+ 'interval' ),
+
+( 'circ.holds.min_estimated_wait_interval',
+ 'Holds: Minimum Estimated Wait',
+ 'When predicting the amount of time a patron will be waiting for a hold to be fulfilled, this is the minimum estimated length of time to assume an item will be checked out.',
+ 'interval' ),
( 'circ.selfcheck.patron_login_timeout',
'Selfcheck: Patron Login Timeout (in seconds)',
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0274'); -- Scott McKellar
+
+UPDATE config.org_unit_setting_type SET
+ name = 'circ.holds.default_estimated_wait_interval',
+ label = 'Holds: Default Estimated Wait',
+ description = 'When predicting the amount of time a patron will be waiting for a hold to be fulfilled, this is the default estimated length of time to assume an item will be checked out.',
+ datatype = 'interval'
+WHERE name = 'circ.hold_estimate_wait_interval';
+
+UPDATE actor.org_unit_setting SET
+ name = 'circ.holds.default_estimated_wait_interval',
+ value = value || ' days'
+WHERE name = 'circ.hold_estimate_wait_interval';
+
+INSERT INTO config.org_unit_setting_type (
+ name,
+ label,
+ description,
+ datatype
+) VALUES (
+ 'circ.holds.min_estimated_wait_interval',
+ 'Holds: Minimum Estimated Wait',
+ 'When predicting the amount of time a patron will be waiting for a hold to be fulfilled, this is the minimum estimated length of time to assume an item will be checked out.',
+ 'interval'
+);
+
+COMMIT;