pin a version number
authorJason Etheridge <jason@esilibrary.com>
Thu, 9 Jun 2011 17:29:00 +0000 (13:29 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 9 Jun 2011 17:30:53 +0000 (13:30 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0549.data.transit-checkin-interval.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.transit-checkin-interval.sql [deleted file]

index 5ea5a86..7b34e66 100644 (file)
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0548', :eg_version); -- dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0549', :eg_version); -- phasefx/berick
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0549.data.transit-checkin-interval.sql b/Open-ILS/src/sql/Pg/upgrade/0549.data.transit-checkin-interval.sql
new file mode 100644 (file)
index 0000000..ec7b584
--- /dev/null
@@ -0,0 +1,53 @@
+-- Evergreen DB patch XXXX.data.transit-checkin-interval.sql
+--
+-- New org unit setting "circ.transit.min_checkin_interval"
+-- New TRANSIT_CHECKIN_INTERVAL_BLOCK.override permission
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0549', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+    'circ.transit.min_checkin_interval',
+    oils_i18n_gettext( 
+        'circ.transit.min_checkin_interval', 
+        'Circ:  Minimum Transit Checkin Interval',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext( 
+        'circ.transit.min_checkin_interval', 
+        'In-Transit items checked in this close to the transit start time will be prevented from checking in',
+        'coust',
+        'label'
+    ),
+    'interval'
+);
+
+INSERT INTO permission.perm_list ( id, code, description ) VALUES (  
+    509, 
+    'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', 
+    oils_i18n_gettext(
+        509,
+        'Allows a user to override the TRANSIT_CHECKIN_INTERVAL_BLOCK event', 
+        'ppl', 
+        'description'
+    )
+);
+
+-- add the perm to the default circ admin group
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
+       SELECT
+               pgt.id, perm.id, aout.depth, TRUE
+       FROM
+               permission.grp_tree pgt,
+               permission.perm_list perm,
+               actor.org_unit_type aout
+       WHERE
+               pgt.name = 'Circulation Administrator' AND
+               aout.name = 'System' AND
+               perm.code IN ( 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override' );
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.transit-checkin-interval.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.transit-checkin-interval.sql
deleted file mode 100644 (file)
index 7ad9e73..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
--- Evergreen DB patch XXXX.data.transit-checkin-interval.sql
---
--- New org unit setting "circ.transit.min_checkin_interval"
--- New TRANSIT_CHECKIN_INTERVAL_BLOCK.override permission
---
-BEGIN;
-
-
--- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
-    'circ.transit.min_checkin_interval',
-    oils_i18n_gettext( 
-        'circ.transit.min_checkin_interval', 
-        'Circ:  Minimum Transit Checkin Interval',
-        'coust',
-        'label'
-    ),
-    oils_i18n_gettext( 
-        'circ.transit.min_checkin_interval', 
-        'In-Transit items checked in this close to the transit start time will be prevented from checking in',
-        'coust',
-        'label'
-    ),
-    'interval'
-);
-
-INSERT INTO permission.perm_list ( id, code, description ) VALUES (  
-    509, 
-    'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', 
-    oils_i18n_gettext(
-        509,
-        'Allows a user to override the TRANSIT_CHECKIN_INTERVAL_BLOCK event', 
-        'ppl', 
-        'description'
-    )
-);
-
--- add the perm to the default circ admin group
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
-       SELECT
-               pgt.id, perm.id, aout.depth, TRUE
-       FROM
-               permission.grp_tree pgt,
-               permission.perm_list perm,
-               actor.org_unit_type aout
-       WHERE
-               pgt.name = 'Circulation Administrator' AND
-               aout.name = 'System' AND
-               perm.code IN ( 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override' );
-
-COMMIT;