LP#1886852: Stamping Upgrade Script
authorJason Stephenson <jason@sigio.com>
Fri, 17 Jul 2020 11:09:29 +0000 (07:09 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 17 Jul 2020 11:09:29 +0000 (07:09 -0400)
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql [new file with mode: 0755]
Open-ILS/src/sql/Pg/upgrade/XXXX.function.distinct-regen_copy_map.sql [deleted file]

index 1a22987..f5b836e 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 ('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/1206.function.distinct-regen_copy_map.sql b/Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql
new file mode 100755 (executable)
index 0000000..a1ecf1b
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1206', :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;
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
deleted file mode 100755 (executable)
index 2d4739a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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;