LP#1743639: Stamping upgrade script for copy location group visibility
authorKathy Lussier <klussier@masslnc.org>
Wed, 17 Jan 2018 18:17:02 +0000 (13:17 -0500)
committerKathy Lussier <klussier@masslnc.org>
Wed, 17 Jan 2018 18:17:02 +0000 (13:17 -0500)
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1086.function.copy_location_group_visible.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.function.copy_location_group_visible.sql [deleted file]

index d47b2b4..650c5ec 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 ('1085', :eg_version); -- miker/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1086', :eg_version); -- miker/kmlussier
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1086.function.copy_location_group_visible.sql b/Open-ILS/src/sql/Pg/upgrade/1086.function.copy_location_group_visible.sql
new file mode 100644 (file)
index 0000000..eac6591
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1086', :eg_version);
+
+CREATE OR REPLACE FUNCTION asset.location_group_default () RETURNS TEXT AS $f$
+    SELECT '!()'::TEXT; -- For now, as there's no way to cause a location group to hide all copies.
+/*
+    SELECT  '!(' || ARRAY_TO_STRING(ARRAY_AGG(search.calculate_visibility_attribute(id, 'location_group')),'|') || ')'
+      FROM  asset.copy_location_group
+      WHERE NOT opac_visible;
+*/
+$f$ LANGUAGE SQL IMMUTABLE;
+
+COMMIT;
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.copy_location_group_visible.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.copy_location_group_visible.sql
deleted file mode 100644 (file)
index ca49b54..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-BEGIN;
-
-CREATE OR REPLACE FUNCTION asset.location_group_default () RETURNS TEXT AS $f$
-    SELECT '!()'::TEXT; -- For now, as there's no way to cause a location group to hide all copies.
-/*
-    SELECT  '!(' || ARRAY_TO_STRING(ARRAY_AGG(search.calculate_visibility_attribute(id, 'location_group')),'|') || ')'
-      FROM  asset.copy_location_group
-      WHERE NOT opac_visible;
-*/
-$f$ LANGUAGE SQL IMMUTABLE;
-
-COMMIT;
-