Stamped upgrade script for ACQ_INVOICE_REOPEN permission addition
authorMike Rylander <mrylander@gmail.com>
Thu, 4 Aug 2011 19:10:36 +0000 (15:10 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 4 Aug 2011 19:10:36 +0000 (15:10 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0592.data.ACQ_INVOICE_REOPEN-perm.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.lp818311.sql [deleted file]

index b0991d1..950947e 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 ('0591', :eg_version); -- berick/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0592', :eg_version); -- mrperters-isl/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0592.data.ACQ_INVOICE_REOPEN-perm.sql b/Open-ILS/src/sql/Pg/upgrade/0592.data.ACQ_INVOICE_REOPEN-perm.sql
new file mode 100644 (file)
index 0000000..5bc68df
--- /dev/null
@@ -0,0 +1,23 @@
+--Upgrade script for lp818311.
+
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0592', :eg_version);
+
+INSERT INTO permission.perm_list ( id, code, description ) VALUES
+ ( 512, 'ACQ_INVOICE_REOPEN', oils_i18n_gettext( 512,
+    'Allows a user to reopen an Acquisitions invoice', 'ppl', 'description' ));
+
+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 = 'Acquisitions Administrator' AND
+               aout.name = 'Consortium' AND
+               perm.code = 'ACQ_INVOICE_REOPEN';
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.lp818311.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.lp818311.sql
deleted file mode 100644 (file)
index 4e7887e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---Upgrade script for lp818311.
-
-BEGIN;
-
-INSERT INTO permission.perm_list ( id, code, description ) VALUES
- ( 512, 'ACQ_INVOICE_REOPEN', oils_i18n_gettext( 512,
-    'Allows a user to reopen an Acquisitions invoice', 'ppl', 'description' ));
-
-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 = 'Acquisitions Administrator' AND
-               aout.name = 'Consortium' AND
-               perm.code = 'ACQ_INVOICE_REOPEN';
-
-COMMIT;