From 50951b430efbfe8b27972d965bc5f6725fc1b3a3 Mon Sep 17 00:00:00 2001 From: Ben Shum Date: Sun, 17 Feb 2013 01:46:16 -0500 Subject: [PATCH] Fix 0752 and 0756 upgrade scripts In 0752, change evergreen.is_json() to just is_json() since some upgraded sites may still have this in their public schema. In 0756, drop some additional remnant functions if they exist. These functions may still lurk in older Evergreen systems upgrading from pre-2.0 times. See for reference these commits which drop the older functions from the schema: 415e0c40cf8ac0fbba91541f9ddf386d02f01fec 24007bf27d6f53073cfb45e4db43b88f651b971b Signed-off-by: Ben Shum Signed-off-by: Jason Stephenson --- Open-ILS/src/sql/Pg/upgrade/0752.schema.url_verify.sql | 2 +- Open-ILS/src/sql/Pg/upgrade/0756.drop.query_parser_fts.sql | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/0752.schema.url_verify.sql b/Open-ILS/src/sql/Pg/upgrade/0752.schema.url_verify.sql index ccf0372254..e3b0a438ba 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0752.schema.url_verify.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0752.schema.url_verify.sql @@ -89,7 +89,7 @@ CREATE TABLE config.filter_dialog_filter_set ( creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), interface TEXT NOT NULL REFERENCES config.filter_dialog_interface (key) DEFERRABLE INITIALLY DEFERRED, - filters TEXT NOT NULL CHECK (evergreen.is_json(filters)), + filters TEXT NOT NULL CHECK (is_json(filters)), CONSTRAINT cfdfs_name_once_per_lib UNIQUE (name, owning_lib) ); diff --git a/Open-ILS/src/sql/Pg/upgrade/0756.drop.query_parser_fts.sql b/Open-ILS/src/sql/Pg/upgrade/0756.drop.query_parser_fts.sql index 2314d91ca1..6e258df9e5 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0756.drop.query_parser_fts.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0756.drop.query_parser_fts.sql @@ -2,6 +2,13 @@ BEGIN; SELECT evergreen.upgrade_deps_block_check('0756', :eg_version); +-- Drop some lingering old functions in search schema +DROP FUNCTION IF EXISTS search.staged_fts(INT,INT,TEXT,INT[],INT[],TEXT[],TEXT[],TEXT[],TEXT[],TEXT[],TEXT[],TEXT[],TEXT,TEXT,TEXT,TEXT[],TEXT,REAL,TEXT,BOOL,BOOL,BOOL,INT,INT,INT); +DROP FUNCTION IF EXISTS search.parse_search_args(TEXT); +DROP FUNCTION IF EXISTS search.explode_array(ANYARRAY); +DROP FUNCTION IF EXISTS search.pick_table(TEXT); + +-- Now drop query_parser_fts and related DROP FUNCTION IF EXISTS search.query_parser_fts(INT,INT,TEXT,INT[],INT[],INT,INT,INT,BOOL,BOOL,INT); DROP TYPE IF EXISTS search.search_result; DROP TYPE IF EXISTS search.search_args; -- 2.11.0