Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#6,728 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, typescript
Lĩnh vực
cli, database, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

🐛 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

Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
523
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
287

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của supabase/cli

Tất cả issue của supabase/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.