From: Mike Rylander Date: Thu, 4 Aug 2011 19:10:36 +0000 (-0400) Subject: Stamped upgrade script for ACQ_INVOICE_REOPEN permission addition X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1e140ad8693d616229c511166ad1284ecfb609a5;p=contrib%2FConifer.git Stamped upgrade script for ACQ_INVOICE_REOPEN permission addition Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index b0991d1f41..950947e05a 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 index 0000000000..5bc68dfa29 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0592.data.ACQ_INVOICE_REOPEN-perm.sql @@ -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 index 4e7887e899..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.lp818311.sql +++ /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;