$$ 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