From 24f13684703b56a4389db967b224074098d909cd Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 6 Sep 2019 18:09:05 -0400 Subject: [PATCH] LP#1068287: stamp database update Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- ...184.data.lp1068287_add_create_precat_permission.sql | 12 ++++++++++++ ...XXX.data.lp1068287_add_create_precat_permission.sql | 18 ------------------ 3 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/1184.data.lp1068287_add_create_precat_permission.sql delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1068287_add_create_precat_permission.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e7b9992dca..54d01e4874 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -92,7 +92,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 ('1183', :eg_version); -- mbucholtz/jeffdavis/gmcharlt +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1184', :eg_version); -- cesardv/phasefx/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1184.data.lp1068287_add_create_precat_permission.sql b/Open-ILS/src/sql/Pg/upgrade/1184.data.lp1068287_add_create_precat_permission.sql new file mode 100644 index 0000000000..d12abedc29 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1184.data.lp1068287_add_create_precat_permission.sql @@ -0,0 +1,12 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1184', :eg_version); + +INSERT INTO permission.perm_list(id, code, description) + VALUES (618, 'CREATE_PRECAT', 'Allows user to create a pre-catalogued copy'); + +-- Add this new permission to any group with Staff login perm. +-- Manually remove if needed +INSERT INTO permission.grp_perm_map(perm, grp, depth) SELECT 618, map.grp, 0 FROM permission.grp_perm_map AS map WHERE map.perm = 2; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1068287_add_create_precat_permission.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1068287_add_create_precat_permission.sql deleted file mode 100644 index e960c5d785..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1068287_add_create_precat_permission.sql +++ /dev/null @@ -1,18 +0,0 @@ --- Evergreen DB patch XXXX.data.lp1068287_add_create_precat_perm.sql --- --- Add a permission to prevent untrained/non-authorized staff from --- adding pre-cat copies/items due to barcode misscans. --- ---BEGIN; - --- check whether patch can be applied ---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -INSERT INTO permission.perm_list(id, code, description) - VALUES (618, 'CREATE_PRECAT', 'Allows user to create a pre-catalogued copy'); - --- Add this new permission to any group with Staff login perm. --- Manually remove if needed -insert into permission.grp_perm_map(perm, grp, depth) select 618, map.grp, 0 from permission.grp_perm_map as map where map.perm = 2; - --- COMMIT; -- 2.11.0