From: Dan Scott Date: Mon, 13 Jun 2011 00:23:47 +0000 (-0400) Subject: Remove 2.1 bits that infiltrated 2.0 database upgrades X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=52db7cd3c9fb40dcba787408c929c2c3b5049e04;p=contrib%2FConifer.git Remove 2.1 bits that infiltrated 2.0 database upgrades Core schema was fine, but the cherry-picked upgrade script didn't show any conflicts (naturally) so some pieces of the 2.1 schema that don't exist in 2.0 made their way into the 0554 upgrade script. Thanks to Ben Shum for catching this. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql b/Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql index 498a98d0ea..57849c78f3 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql @@ -158,20 +158,9 @@ BEGIN LIMIT 1; IF NOT FOUND THEN - PERFORM 1 - FROM biblio.peer_bib_copy_map pr - JOIN asset.copy cp ON (cp.id = pr.target_copy) - WHERE NOT cp.deleted - AND cp.status IN ( SELECT * FROM unnest( param_statuses ) ) - AND pr.peer_record IN ( SELECT * FROM unnest( core_result.records ) ) - AND cp.circ_lib IN ( SELECT * FROM unnest( search_org_list ) ) - LIMIT 1; - - IF NOT FOUND THEN - -- RAISE NOTICE ' % and multi-home linked records were all status-excluded ... ', core_result.records; - excluded_count := excluded_count + 1; - CONTINUE; - END IF; + -- RAISE NOTICE ' % were all status-excluded ... ', core_result.records; + excluded_count := excluded_count + 1; + CONTINUE; END IF; END IF; @@ -189,20 +178,9 @@ BEGIN LIMIT 1; IF NOT FOUND THEN - PERFORM 1 - FROM biblio.peer_bib_copy_map pr - JOIN asset.copy cp ON (cp.id = pr.target_copy) - WHERE NOT cp.deleted - AND cp.location IN ( SELECT * FROM unnest( param_locations ) ) - AND pr.peer_record IN ( SELECT * FROM unnest( core_result.records ) ) - AND cp.circ_lib IN ( SELECT * FROM unnest( search_org_list ) ) - LIMIT 1; - - IF NOT FOUND THEN - -- RAISE NOTICE ' % and multi-home linked records were all copy_location-excluded ... ', core_result.records; - excluded_count := excluded_count + 1; - CONTINUE; - END IF; + -- RAISE NOTICE ' % were all copy_location-excluded ... ', core_result.records; + excluded_count := excluded_count + 1; + CONTINUE; END IF; END IF; @@ -216,19 +194,9 @@ BEGIN LIMIT 1; IF NOT FOUND THEN - PERFORM 1 - FROM biblio.peer_bib_copy_map pr - JOIN asset.opac_visible_copies cp ON (cp.copy_id = pr.target_copy) - WHERE cp.circ_lib IN ( SELECT * FROM unnest( search_org_list ) ) - AND pr.peer_record IN ( SELECT * FROM unnest( core_result.records ) ) - LIMIT 1; - - IF NOT FOUND THEN - - -- RAISE NOTICE ' % and multi-home linked records were all visibility-excluded ... ', core_result.records; - excluded_count := excluded_count + 1; - CONTINUE; - END IF; + -- RAISE NOTICE ' % were all visibility-excluded ... ', core_result.records; + excluded_count := excluded_count + 1; + CONTINUE; END IF; ELSE @@ -245,25 +213,14 @@ BEGIN IF NOT FOUND THEN PERFORM 1 - FROM biblio.peer_bib_copy_map pr - JOIN asset.copy cp ON (cp.id = pr.target_copy) - WHERE NOT cp.deleted - AND cp.circ_lib IN ( SELECT * FROM unnest( search_org_list ) ) - AND pr.peer_record IN ( SELECT * FROM unnest( core_result.records ) ) + FROM asset.call_number cn + WHERE cn.record IN ( SELECT * FROM unnest( core_result.records ) ) LIMIT 1; - IF NOT FOUND THEN - - PERFORM 1 - FROM asset.call_number cn - WHERE cn.record IN ( SELECT * FROM unnest( core_result.records ) ) - LIMIT 1; - - IF FOUND THEN - -- RAISE NOTICE ' % and multi-home linked records were all visibility-excluded ... ', core_result.records; - excluded_count := excluded_count + 1; - CONTINUE; - END IF; + IF FOUND THEN + -- RAISE NOTICE ' % were all visibility-excluded ... ', core_result.records; + excluded_count := excluded_count + 1; + CONTINUE; END IF; END IF;