You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Doing a db dump with npx supabase@v1.142.2 db pull, without any migration file stored, does not include the activated extensions like with npx supabase@v1.138.0 db pull .
To Reproduce
Steps to reproduce the behavior:
Create a supabase project with extensions
Write a postgresql function which is using ltree as an example and store it
npx supabase@v1.142.2 db pull
npx supabase@v1.142.2 start
npx supabase@v1.142.2 db reset
ERROR: type "public.ltree" does not exist (SQLSTATE 42704)
Function and extension ltree
CREATE EXTENSION IF NOT EXISTS "ltree" WITH SCHEMA "public";
CREATE OR REPLACEFUNCTIONupdate_path(
old_path ltree,
new_path ltree
) RETURNS VOID AS $$
BEGINUPDATE your_table_name
SETpath= new_path || subpath(path, nlevel(old_path))
WHEREpath<@ old_path;
END;
$$ LANGUAGE plpgsql;
SET statement_timeout =0;
SET lock_timeout =0;
SET idle_in_transaction_session_timeout =0;
SET client_encoding ='UTF8';
SET standard_conforming_strings =on;
SELECTpg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
CREATESCHEMAIF NOT EXISTS "public";
ALTERSCHEMA"public" OWNER TO "pg_database_owner";
CREATE OR REPLACEFUNCTION "public"."update_path"("old_path""public"."ltree", "new_path""public"."ltree") RETURNS "void"
LANGUAGE "plpgsql"AS $$
BEGINUPDATE your_table_name
SETpath= new_path || subpath(path, nlevel(old_path))
WHEREpath<@ old_path;
END;
$$;
ALTERFUNCTION"public"."update_path"("old_path""public"."ltree", "new_path""public"."ltree") OWNER TO "postgres";
GRANT USAGE ON SCHEMA "public" TO "postgres";
GRANT USAGE ON SCHEMA "public" TO "anon";
GRANT USAGE ON SCHEMA "public" TO "authenticated";
GRANT USAGE ON SCHEMA "public" TO "service_role";
GRANT ALL ON FUNCTION "public"."update_path"("old_path""public"."ltree", "new_path""public"."ltree") TO "anon";
GRANT ALL ON FUNCTION "public"."update_path"("old_path""public"."ltree", "new_path""public"."ltree") TO "authenticated";
GRANT ALL ON FUNCTION "public"."update_path"("old_path""public"."ltree", "new_path""public"."ltree") TO "service_role";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON SEQUENCES TO "postgres";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON SEQUENCES TO "anon";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON SEQUENCES TO "authenticated";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON SEQUENCES TO "service_role";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON FUNCTIONS TO "postgres";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON FUNCTIONS TO "anon";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON FUNCTIONS TO "authenticated";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON FUNCTIONS TO "service_role";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON TABLES TO "postgres";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON TABLES TO "anon";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON TABLES TO "authenticated";
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres"IN SCHEMA "public"GRANT ALL ON TABLES TO "service_role";
RESET ALL;
Expected behavior
The exported migration file should contain the missing extension. With command npx supabase@v1.138.0 db pull it does contain the extension info.
CREATE EXTENSION IF NOT EXISTS "ltree" WITH SCHEMA "public";
Screenshots
No screenshots
System information
Rerun the failing command with --create-ticket flag (preferred).
@sweatybridge Why is the --extensions flag only passed when no schema list is specified?
Because I am using a trigger on auth.users and a custom app namespace, I need to pass -s public,auth,app and then, I am missing the CREATE EXTENSION calls. Also, -s public,auth,app,extensions does not fix it. It dumps stuff from that namespace but not the CREATE EXTENSION calls themselves.
Describe the bug
Doing a db dump with
npx supabase@v1.142.2 db pull
, without any migration file stored, does not include the activated extensions like withnpx supabase@v1.138.0 db pull
.To Reproduce
Steps to reproduce the behavior:
Function and extension ltree
Migration file supabase/migrations/20240219141944_remote_schema.sql
Expected behavior
The exported migration file should contain the missing extension. With command
npx supabase@v1.138.0 db pull
it does contain the extension info.Screenshots
No screenshots
System information
Rerun the failing command with
--create-ticket
flag (preferred).supabase/gotrue: can not be used because of failed to pull docker image #1938
Additional context
No
The text was updated successfully, but these errors were encountered: