From: Galen Charlton Date: Thu, 13 Aug 2020 15:32:57 +0000 (-0400) Subject: tidying of Pg/upgrade scripts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=30dcf71b98f4b48fb1e05c7d3c74afa3b31a0ebc;p=evergreen%2Fpines.git tidying of Pg/upgrade scripts - remove executable flag - add .sql extension to a recent one Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/upgrade/1014.metarecord_constituents_search_result_page_should_use_standard_search_code.sql b/Open-ILS/src/sql/Pg/upgrade/1014.metarecord_constituents_search_result_page_should_use_standard_search_code.sql old mode 100755 new mode 100644 diff --git a/Open-ILS/src/sql/Pg/upgrade/1015.function.lp1573734_include-transcendent_bibs_in_unapi_mmr.sql b/Open-ILS/src/sql/Pg/upgrade/1015.function.lp1573734_include-transcendent_bibs_in_unapi_mmr.sql old mode 100755 new mode 100644 diff --git a/Open-ILS/src/sql/Pg/upgrade/1199.lp1849736_at_email_self_register.sql b/Open-ILS/src/sql/Pg/upgrade/1199.lp1849736_at_email_self_register.sql old mode 100755 new mode 100644 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 index 7e5742a7fb..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order +++ /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 index 0000000000..7e5742a7fb --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1203.hpprox-best-hold-sort-order.sql @@ -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; 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 old mode 100755 new mode 100644