From: Dan Scott Date: Sat, 11 Jun 2011 11:23:45 +0000 (-0400) Subject: Correct base schema for superseded/deprecated functions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3151bb5c5dc8e6512a9e8619f09a2bf5fc047717;p=contrib%2FConifer.git 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 --- 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