Skip to content

Conversation

@ignacio-gradial
Copy link

@ignacio-gradial ignacio-gradial commented Jan 31, 2026

Summary

  • Fixes --workdir config resolution when config.toml lives at the project root (no supabase/ subdir).
  • Ensures migrations and db.seed.sql_paths are resolved relative to that root config.

Changes

  • Add SetSupabaseDirPath to update derived paths when the config root isn’t supabase/.
  • In flags.LoadConfig, detect root config.toml and set paths before loading config.

Repro / Verification

# start
go run . start --workdir /Users/iguridi/supabase/repro2/apps/supabase
# reset
go run . db reset --workdir /Users/iguridi/supabase/repro2/apps/supabase --yes

Observed:

  • Migration applied: Applying migration 20250101000000_init.sql...
  • Seed applied: Seeding data from seed/base/01-seed.sql...

DB check:

select * from public.test_repro; -- returns 1 row

Closes #4784

@ignacio-gradial ignacio-gradial requested a review from a team as a code owner January 31, 2026 02:47
@ignacio-gradial ignacio-gradial changed the base branch from main to develop January 31, 2026 02:51
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21537450997

Details

  • 5 of 40 (12.5%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 55.323%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/utils/flags/config_path.go 5 8 62.5%
internal/utils/misc.go 0 32 0.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 21522313044: -0.2%
Covered Lines: 7114
Relevant Lines: 12859

💛 - Coveralls

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.

db reset ignores migrations and sql_paths when using SUPABASE_PROJECT_ID env var

2 participants