BEGIN;

INSERT INTO config.upgrade_log (version) VALUES ('0460'); -- dbs

INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
    VALUES
        ('circ.holds.recall_threshold',
        oils_i18n_gettext( 'circ.holds.recall_threshold',
            'Recalls: Circulation duration that triggers a recall.', 'coust', 'label'),
        oils_i18n_gettext( 'circ.holds.recall_threshold',
            'Recalls: A hold placed on an item with a circulation duration longer than this will trigger a recall. For example, "14 days" or "3 weeks".', 'coust', 'description'),
        'interval')
;

INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
    VALUES
        ('circ.holds.recall_return_interval',
        oils_i18n_gettext( 'circ.holds.recall_return_interval',
            'Recalls: Truncated loan period.', 'coust', 'label'),
        oils_i18n_gettext( 'circ.holds.recall_return_interval',
            'Recalls: When a recall is triggered, this defines the adjusted loan period for the item. For example, "4 days" or "1 week".', 'coust', 'description'),
        'interval')
;

INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
    VALUES
        ('circ.holds.recall_fine_rules',
        oils_i18n_gettext( 'circ.holds.recall_fine_rules',
            'Recalls: An array of fine amount, fine interval, and maximum fine.', 'coust', 'label'),
        oils_i18n_gettext( 'circ.holds.recall_fine_rules',
            'Recalls: An array of fine amount, fine interval, and maximum fine. For example, to specify a new fine rule of $5.00 per day, with a maximum fine of $50.00, use: [5.00,"1 day",50.00]', 'coust', 'description'),
        'array')
;

INSERT INTO action_trigger.environment (event_def, path) VALUES
    (37, 'target_copy.call_number.record.simple_record'),
    (37, 'usr'),
    (37, 'circ_lib.billing_address')
;

COMMIT;
