From 3151bb5c5dc8e6512a9e8619f09a2bf5fc047717 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Sat, 11 Jun 2011 07:23:45 -0400 Subject: [PATCH] Correct base schema for superseded/deprecated functions As discussed on Evergreen dev list, the base schema didn't match what one would accomplish via upgrades for the evergreen.upgrade_list_applied_deprecated() and evergreen.upgrade_list_applied_superseded() functions; they were returning TEXT instead of SETOF TEXT. Signed-off-by: Dan Scott --- Open-ILS/src/sql/Pg/002.schema.config.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 9b5bffb362..4252778f07 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -840,17 +840,17 @@ CREATE OR REPLACE FUNCTION evergreen.upgrade_list_applied_supersedes ( my_db_pat $$ LANGUAGE SQL; -- List applied db patches that deprecates (and block the application of) my_db_patch -CREATE OR REPLACE FUNCTION evergreen.upgrade_list_applied_deprecated ( my_db_patch TEXT ) RETURNS TEXT AS $$ +CREATE FUNCTION evergreen.upgrade_list_applied_deprecated ( my_db_patch TEXT ) RETURNS SETOF TEXT AS $$ SELECT db_patch FROM config.db_patch_dependencies - WHERE ARRAY[$1]::TEXT[] && deprecates + WHERE ARRAY[$1]::TEXT[] && deprecates $$ LANGUAGE SQL; -- List applied db patches that supersedes (and block the application of) my_db_patch -CREATE OR REPLACE FUNCTION evergreen.upgrade_list_applied_superseded ( my_db_patch TEXT ) RETURNS TEXT AS $$ +CREATE FUNCTION evergreen.upgrade_list_applied_superseded ( my_db_patch TEXT ) RETURNS SETOF TEXT AS $$ SELECT db_patch FROM config.db_patch_dependencies - WHERE ARRAY[$1]::TEXT[] && supersedes + WHERE ARRAY[$1]::TEXT[] && supersedes $$ LANGUAGE SQL; -- Make sure that no deprecated or superseded db patches are currently applied -- 2.11.0