From 4b462fb7dd61713d69c89d3b02c4ad77217b441d Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 29 Aug 2017 17:44:26 -0400 Subject: [PATCH] lp1582354 stamping schema upgrade and some other tweaks: 1) removing permacrud stanza from IDL entry 2) changing a tab to spaces 3) making the upgrade script match the extend-reporter.sql change Signed-off-by: Jason Etheridge --- Open-ILS/examples/fm_IDL.xml | 5 ----- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/extend-reporter.sql | 2 +- ...rt_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql} | 5 +++-- 4 files changed, 5 insertions(+), 9 deletions(-) rename Open-ILS/src/sql/Pg/upgrade/{XXXX.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql => 1060.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql} (82%) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 90d83f12bf..7764758566 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -9507,11 +9507,6 @@ SELECT usr, - - - - - diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e73c016821..9bf7ff5dd8 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -90,7 +90,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 ('1059', :eg_version); -- Stompro/DPearl/kmlussier +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1060', :eg_version); -- Bmagic/csharp/phasefx CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/extend-reporter.sql b/Open-ILS/src/sql/Pg/extend-reporter.sql index a524cbbc3a..d245f4071e 100644 --- a/Open-ILS/src/sql/Pg/extend-reporter.sql +++ b/Open-ILS/src/sql/Pg/extend-reporter.sql @@ -58,7 +58,7 @@ CREATE OR REPLACE VIEW extend_reporter.global_bibs_by_holding_update AS CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS SELECT acn.record AS bibid, ac.circ_lib, - acn.owning_lib, + acn.owning_lib, max(ac.edit_date) AS last_edit_time, min(ac.deleted::integer) AS has_only_deleted_copies, count( diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql b/Open-ILS/src/sql/Pg/upgrade/1060.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql similarity index 82% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql rename to Open-ILS/src/sql/Pg/upgrade/1060.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql index 9b34294758..1b852a6d4b 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1060.LP1582354_report_able_to_show_bibs_where_the_last_copy_was_deleted_cancels.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1060', :eg_version); DROP VIEW IF EXISTS extend_reporter.copy_count_per_org; @@ -8,6 +8,7 @@ DROP VIEW IF EXISTS extend_reporter.copy_count_per_org; CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS SELECT acn.record AS bibid, ac.circ_lib, + acn.owning_lib, max(ac.edit_date) AS last_edit_time, min(ac.deleted::integer) AS has_only_deleted_copies, count( @@ -24,7 +25,7 @@ CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS FROM asset.call_number acn, asset.copy ac WHERE ac.call_number = acn.id - GROUP BY acn.record, ac.circ_lib; + GROUP BY acn.record, acn.owning_lib, ac.circ_lib; COMMIT; -- 2.11.0