LP#1068287: stamp database update
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 6 Sep 2019 22:09:05 +0000 (18:09 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 6 Sep 2019 22:09:05 +0000 (18:09 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1184.data.lp1068287_add_create_precat_permission.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1068287_add_create_precat_permission.sql [deleted file]

index e7b9992..54d01e4 100644 (file)
@@ -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 (file)
index 0000000..d12abed
--- /dev/null
@@ -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 (file)
index e960c5d..0000000
+++ /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;