Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

supabase db pull --declarative skips schema if extension is created in a schema without any additional object

Open
#6,728 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, typescript
Domain
cli, database, devtools

Research direction

The issue is in the declarative schema sync logic when an extension is created in a new, empty schema. Look at the code that handles supabase db pull --declarative and supabase db schema declarative sync, likely in the database migration or schema planning modules. Examine how the load order for SQL files is determined, particularly for extensions and schema creation. The goal is to ensure the schema creation statement is ordered before the extension creation that depends on it.

Written by the indexing model from the issue text.

Description

🐛 Bug supabase/cli
Affected area

Database

Supabase CLI version

v2.117.0

Operating system

macOS

Installation method

brew

Command
supabase db pull --declarative --local
supabase db schema declarative sync
Actual output
Declarative schema planning failed: shadow load stuck after 10 round(s): 1 file(s) cannot apply
  - _cluster/extensions/pgmq.sql: schema "pgmq" does not exist — at line 1: CREATE EXTENSION "pgmq" SCHEMA "pgmq" (failed identically in 10 round(s) — likely a genuine missing dependency, not ordering)
  - Default load order stuck; reordered (statement-kind).
  stuck _cluster/extensions/pgmq.sql:1 CREATE EXTENSION "pgmq" SCHEMA "pgmq" (schema "pgmq" does not exist)
  after _cluster/extensions/btree_gin.sql:1 CREATE EXTENSION "btree_gin" SCHEMA "extensions";
Set loadOrder on .pgdelta-export.json to put _cluster/extensions/btree_gin.sql before _cluster/extensions/pgmq.sql.
Expected behavior

Migration file to be created.

Steps to reproduce
  1. Execute the following sql on the supabase database:
CREATE SCHEMA "pgmq";
CREATE EXTENSION "pgmq" SCHEMA "pgmq";
  1. Execute supabase db pull --declarative --local
  2. Execute supabase db schema declarative sync
Crash report ID

No response

Docker and service versions

Additional context

No response

Dominant language
TypeScript
Stars
2.4k
Forks
523
Avg merge
1d 1h
Merged PRs (30d)
268

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/cli

All issues in supabase/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.