[open-ils-commits] [GIT] Evergreen ILS branch master updated. 145f3da58aef1ef4163c29cd9d56a13146145090
Evergreen Git
git at git.evergreen-ils.org
Fri Jul 17 07:14:58 EDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 145f3da58aef1ef4163c29cd9d56a13146145090 (commit)
via 53b9deca88551f8d32985949436a8433a88ef502 (commit)
from 433059d7aac834be9c893491a14353ed996db48b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 145f3da58aef1ef4163c29cd9d56a13146145090
Author: Jason Stephenson <jason at sigio.com>
Date: Fri Jul 17 07:09:29 2020 -0400
LP#1886852: Stamping Upgrade Script
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 1a2298710c..f5b836e83b 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 ('1205', :eg_version); -- sandbergja/tmcanna/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1206', :eg_version); -- miker/dyrcona
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql b/Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql
similarity index 82%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql
rename to Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql
index 2d4739a48e..a1ecf1b55c 100755
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql
@@ -1,6 +1,6 @@
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1206', :eg_version);
CREATE OR REPLACE FUNCTION
action.hold_request_regen_copy_maps(
commit 53b9deca88551f8d32985949436a8433a88ef502
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed Jul 8 13:18:52 2020 -0400
LP#1886852: Protect against dupes in hold-copy map function
If the DB function that regenerates the hold-copy maps for a hold
receives duplicate copies in its second parameter, it blows up. This
commit prevents that by making the list unique at use time.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index af8a3e36b9..8d8163b6f9 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -548,7 +548,7 @@ CREATE OR REPLACE FUNCTION
action.hold_request_regen_copy_maps(
hold_id INTEGER, copy_ids INTEGER[]) RETURNS VOID AS $$
DELETE FROM action.hold_copy_map WHERE hold = $1;
- INSERT INTO action.hold_copy_map (hold, target_copy) SELECT $1, UNNEST($2);
+ INSERT INTO action.hold_copy_map (hold, target_copy) SELECT DISTINCT $1, UNNEST($2);
$$ LANGUAGE SQL;
CREATE TABLE action.transit_copy (
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql
new file mode 100755
index 0000000000..2d4739a48e
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql
@@ -0,0 +1,12 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE OR REPLACE FUNCTION
+ action.hold_request_regen_copy_maps(
+ hold_id INTEGER, copy_ids INTEGER[]) RETURNS VOID AS $$
+ DELETE FROM action.hold_copy_map WHERE hold = $1;
+ INSERT INTO action.hold_copy_map (hold, target_copy) SELECT DISTINCT $1, UNNEST($2);
+$$ LANGUAGE SQL;
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/090.schema.action.sql | 2 +-
.../sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql | 12 ++++++++++++
3 files changed, 14 insertions(+), 2 deletions(-)
create mode 100755 Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list