diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh index 2923fffd7..f9c35ed16 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh @@ -174,6 +174,12 @@ EOF function patch_wrappers { local IS_NIX_UPGRADE=$1 + WRAPPERS_ENABLED=$(run_sql -A -t -c "SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = 'wrappers');") + if [ "$WRAPPERS_ENABLED" = "f" ]; then + echo "Wrappers extension not enabled. Skipping." + return + fi + # This is a workaround for older versions of wrappers which don't have the expected # naming scheme, containing the version in their library's file name # e.g. wrappers-0.1.16.so, rather than wrappers.so diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index af0c15b5d..0411c003c 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -13,7 +13,7 @@ let gitTags = builtins.fromJSON (builtins.readFile (builtins.fetchurl { url = "https://api.github.com/repos/supabase/wrappers/tags"; - sha256 = "0am40yspir70wp8pik1c7qmfvbby3nyxza115pi9klp6fyv2s93j"; # Replace with actual hash + sha256 = "0pvavn0f8wnaszq4bmvjkadm6xbvf91rbhcmmgjasqajb69vskv9"; # Replace with actual hash })); in buildPgrxExtension_0_11_3 rec {