Skip to content

feat(db): support .sql.gz seed files with automatic decompression#5105

Open
Basavaraj8143 wants to merge 1 commit intosupabase:developfrom
Basavaraj8143:feat/sql-gz-seed
Open

feat(db): support .sql.gz seed files with automatic decompression#5105
Basavaraj8143 wants to merge 1 commit intosupabase:developfrom
Basavaraj8143:feat/sql-gz-seed

Conversation

@Basavaraj8143
Copy link
Copy Markdown

Summary

This PR adds support for gzipped seed SQL files (.sql.gz) during database seeding.

What’s included

  • Auto-detect .sql.gz seed files by extension.
  • Decompress gzipped SQL before parsing/executing.
  • Reuse the same path for seed hashing so change detection works for compressed seeds.
  • Add tests for:
    • pending gzipped seeds
    • seeding from gzipped seed files
    • seeding globals from gzipped files
  • Update docs/config comments to mention .sql.gz support.

Why

Large seed files are common in DB-first workflows. Compressed seed files reduce repo/storage size while keeping db reset/seed automation intact.

Backward compatibility

  • Existing .sql behavior is unchanged.
  • .sql.gz is additive and auto-detected from extension.

@Basavaraj8143 Basavaraj8143 requested a review from a team as a code owner April 20, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant