[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. a27f472feb7653988a42ff450d9ba1be4fc698bf
Evergreen Git
git at git.evergreen-ils.org
Thu Jul 7 14:37:43 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_0 has been updated
via a27f472feb7653988a42ff450d9ba1be4fc698bf (commit)
from d5f91cdde6473aa2968e87118cccf3155bce9fa4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a27f472feb7653988a42ff450d9ba1be4fc698bf
Author: Mike Rylander <mrylander at gmail.com>
Date: Thu Jul 7 14:34:20 2011 -0400
Backport of staff_search_find_no_copies branch from Thomas Berezansky
Hand-backport of:
4d0dae6ee876830cb87ee393a41fcdc478ecc6b0
9a356a2371930c76554fd3dc5a7d10dc21cf914a
a45184da2ac9f490886ebde47fcc8af4227afcf0
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 3e64525..c21d274 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0561'); -- dbs via miker
+INSERT INTO config.upgrade_log (version) VALUES ('0573'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
index 40e6dce..5f65303 100644
--- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
+++ b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
@@ -241,7 +241,9 @@ BEGIN
PERFORM 1
FROM asset.call_number cn
+ JOIN asset.copy cp ON (cp.call_number = cn.id)
WHERE cn.record IN ( SELECT * FROM unnest( core_result.records ) )
+ AND NOT cp.deleted
LIMIT 1;
IF FOUND THEN
diff --git a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql b/Open-ILS/src/sql/Pg/upgrade/0573.schema.staff_search_find_no_copies.sql
similarity index 86%
copy from Open-ILS/src/sql/Pg/300.schema.staged_search.sql
copy to Open-ILS/src/sql/Pg/upgrade/0573.schema.staff_search_find_no_copies.sql
index 40e6dce..3e7b069 100644
--- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0573.schema.staff_search_find_no_copies.sql
@@ -1,37 +1,6 @@
-/*
- * Copyright (C) 2007-2010 Equinox Software, Inc.
- * Mike Rylander <miker at esilibrary.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-
-DROP SCHEMA IF EXISTS search CASCADE;
-
BEGIN;
-CREATE SCHEMA search;
-
-CREATE TABLE search.relevance_adjustment (
- id SERIAL PRIMARY KEY,
- active BOOL NOT NULL DEFAULT TRUE,
- field INT NOT NULL REFERENCES config.metabib_field (id) DEFERRABLE INITIALLY DEFERRED,
- bump_type TEXT NOT NULL CHECK (bump_type IN ('word_order','first_word','full_match')),
- multiplier NUMERIC NOT NULL DEFAULT 1.0
-);
-CREATE UNIQUE INDEX bump_once_per_field_idx ON search.relevance_adjustment ( field, bump_type );
-
-CREATE TYPE search.search_result AS ( id BIGINT, rel NUMERIC, record INT, total INT, checked INT, visible INT, deleted INT, excluded INT );
-CREATE TYPE search.search_args AS ( id INT, field_class TEXT, field_name TEXT, table_alias TEXT, term TEXT, term_type TEXT );
+INSERT INTO config.upgrade_log (version) VALUES ('0573'); -- miker
CREATE OR REPLACE FUNCTION search.query_parser_fts (
@@ -241,7 +210,9 @@ BEGIN
PERFORM 1
FROM asset.call_number cn
+ JOIN asset.copy cp ON (cp.call_number = cn.id)
WHERE cn.record IN ( SELECT * FROM unnest( core_result.records ) )
+ AND NOT cp.deleted
LIMIT 1;
IF FOUND THEN
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/300.schema.staged_search.sql | 2 ++
...=> 0573.schema.staff_search_find_no_copies.sql} | 9 ++++-----
3 files changed, 7 insertions(+), 6 deletions(-)
copy Open-ILS/src/sql/Pg/upgrade/{0554.unnest_search_query_parser_fts.sql => 0573.schema.staff_search_find_no_copies.sql} (97%)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list