tidying of Pg/upgrade scripts
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 13 Aug 2020 15:32:57 +0000 (11:32 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 13 Aug 2020 15:32:57 +0000 (11:32 -0400)
- remove executable flag
- add .sql extension to a recent one

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/upgrade/1014.metarecord_constituents_search_result_page_should_use_standard_search_code.sql [changed mode: 0755->0644]
Open-ILS/src/sql/Pg/upgrade/1015.function.lp1573734_include-transcendent_bibs_in_unapi_mmr.sql [changed mode: 0755->0644]
Open-ILS/src/sql/Pg/upgrade/1199.lp1849736_at_email_self_register.sql [changed mode: 0755->0644]
Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order [deleted file]
Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/1206.function.distinct-regen_copy_map.sql [changed mode: 0755->0644]

diff --git a/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order b/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order
deleted file mode 100755 (executable)
index 7e5742a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('1203', :eg_version);
-
-ALTER TABLE config.best_hold_order ADD COLUMN owning_lib_to_home_lib_prox INT; -- copy owning lib <-> user home lib prox
-
-ALTER table config.best_hold_order DROP CONSTRAINT best_hold_order_check;
-
--- At least one of these columns must contain a non-null value
-ALTER TABLE config.best_hold_order ADD CHECK ((
-    pprox IS NOT NULL OR
-    hprox IS NOT NULL OR
-    owning_lib_to_home_lib_prox IS NOT NULL OR
-    aprox IS NOT NULL OR
-    priority IS NOT NULL OR
-    cut IS NOT NULL OR
-    depth IS NOT NULL OR
-    htime IS NOT NULL OR
-    rtime IS NOT NULL
-));
-
-INSERT INTO config.best_hold_order (
-    name,
-    owning_lib_to_home_lib_prox, hprox, approx, pprox, aprox, priority, cut, depth, rtime
-) VALUES (
-    'Traditional with Holds-chase-home-lib-patrons',
-    1, 2, 3, 4, 5, 6, 7, 8, 9
-);
-
-COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order.sql b/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order.sql
new file mode 100644 (file)
index 0000000..7e5742a
--- /dev/null
@@ -0,0 +1,30 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1203', :eg_version);
+
+ALTER TABLE config.best_hold_order ADD COLUMN owning_lib_to_home_lib_prox INT; -- copy owning lib <-> user home lib prox
+
+ALTER table config.best_hold_order DROP CONSTRAINT best_hold_order_check;
+
+-- At least one of these columns must contain a non-null value
+ALTER TABLE config.best_hold_order ADD CHECK ((
+    pprox IS NOT NULL OR
+    hprox IS NOT NULL OR
+    owning_lib_to_home_lib_prox IS NOT NULL OR
+    aprox IS NOT NULL OR
+    priority IS NOT NULL OR
+    cut IS NOT NULL OR
+    depth IS NOT NULL OR
+    htime IS NOT NULL OR
+    rtime IS NOT NULL
+));
+
+INSERT INTO config.best_hold_order (
+    name,
+    owning_lib_to_home_lib_prox, hprox, approx, pprox, aprox, priority, cut, depth, rtime
+) VALUES (
+    'Traditional with Holds-chase-home-lib-patrons',
+    1, 2, 3, 4, 5, 6, 7, 8, 9
+);
+
+COMMIT;