From: Kathy Lussier Date: Fri, 10 Jun 2016 15:51:41 +0000 (-0400) Subject: LP#1526858: Stamping upgrade script for faster alhr query X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a6d3bdea207394fafc8caf92dcd18843410fcb2e;p=evergreen%2Fpines.git LP#1526858: Stamping upgrade script for faster alhr query Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 23f407488c..7a011f0e4a 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -91,7 +91,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 ('0980', :eg_version); -- DPearl/kmlussier +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0981', :eg_version); -- gmcharlt/jlundgren/kmlussier CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql b/Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql new file mode 100644 index 0000000000..5b84cc2aad --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0981.schema.indexes_for_alhr_queries.sql @@ -0,0 +1,8 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0981', :eg_version); + +CREATE INDEX hold_request_copy_capture_time_idx ON action.hold_request (current_copy,capture_time); +CREATE INDEX hold_request_open_captured_shelf_lib_idx ON action.hold_request (current_shelf_lib) WHERE capture_time IS NOT NULL AND fulfillment_time IS NULL AND (pickup_lib <> current_shelf_lib); + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql deleted file mode 100644 index afc83b8b15..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.indexes_for_alhr_queries.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - ---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -CREATE INDEX hold_request_copy_capture_time_idx ON action.hold_request (current_copy,capture_time); -CREATE INDEX hold_request_open_captured_shelf_lib_idx ON action.hold_request (current_shelf_lib) WHERE capture_time IS NOT NULL AND fulfillment_time IS NULL AND (pickup_lib <> current_shelf_lib); - -COMMIT;