ERROR: schema "pgmq" does not exist (SQLSTATE 3F000)

I'm trying to get my project migrations in order but am running into an issuer with "pgmq". This is an existing project if that matters.

To reproduce:
  • npx supabase db pull
  • npx supabase db pull --schema auth,storage
The second command will fail with:
ERROR: schema "pgmq" does not exist (SQLSTATE 3F000)    
At statement: 20                                        
CREATE EXTENSION IF NOT EXISTS "pgmq" WITH SCHEMA "pgmq"


Looking at the migration, it is not creating the pgmq schema before creating the extension.

Do I just need to modify the created migration to create the schema? Other issues are about the extension not existing, but this is about the schema not existing.
Was this page helpful?