[open-ils-commits] r16826 - branches/rel_1_6_1/Open-ILS/src/sql/Pg (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jun 28 17:36:05 EDT 2010


Author: senator
Date: 2010-06-28 17:35:59 -0400 (Mon, 28 Jun 2010)
New Revision: 16826

Modified:
   branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
Patch from Don McMorris. Good catch, Don.

He writes:

    In the branch rel_1_6 version of 950.data.seed-values.sql [1], lines
    138-142 create the OU setting
    'circ.booking_reservation.default_elbow_room' via the query:

    INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
               (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
               'circ.booking_reservation.default_elbow_room',
               '"1 day"'
           );

    However, it appears that actor.org_unit does not start to get
    populated until line 853.  As such, the "SELECT id FROM actor.org_unit
    WHERE parent_ou IS NULL" portion of the insert will return NULL, and
    actor.org_unit_setting.org_unit has a 'NOT NULL' contraint - as such,
    the insert fails.

    [...]



Modified: branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-06-28 21:34:49 UTC (rev 16825)
+++ branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-06-28 21:35:59 UTC (rev 16826)
@@ -130,17 +130,6 @@
 
 SELECT SETVAL('config.copy_status_id_seq'::TEXT, 100);
 
--- In booking, elbow room defines:
---  a) how far in the future you must make a reservation on a given item if
---      that item will have to transit somewhere to fulfill the reservation.
---  b) how soon a reservation must be starting for the reserved item to
---      be op-captured by the checkin interface.
-INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
-    (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
-    'circ.booking_reservation.default_elbow_room',
-    '"1 day"'
-);
-
 INSERT INTO config.net_access_level (id, name) VALUES 
     (1, oils_i18n_gettext(1, 'Filtered', 'cnal', 'name'));
 INSERT INTO config.net_access_level (id, name) VALUES 
@@ -874,6 +863,17 @@
 
 UPDATE actor.org_unit SET holds_address = 1, ill_address = 1, billing_address = 1, mailing_address = 1;
 
+-- In booking, elbow room defines:
+--  a) how far in the future you must make a reservation on a given item if
+--      that item will have to transit somewhere to fulfill the reservation.
+--  b) how soon a reservation must be starting for the reserved item to
+--      be op-captured by the checkin interface.
+INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
+    (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
+    'circ.booking_reservation.default_elbow_room',
+    '"1 day"'
+);
+
 INSERT INTO config.billing_type (id, name, owner) VALUES
 	( 1, oils_i18n_gettext(1, 'Overdue Materials', 'cbt', 'name'), 1);
 INSERT INTO config.billing_type (id, name, owner) VALUES



More information about the open-ils-commits mailing list