Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supabase migration fetch: failed to scan targets #2725

Closed
tvogel opened this issue Oct 3, 2024 · 2 comments · Fixed by #2746
Closed

supabase migration fetch: failed to scan targets #2725

tvogel opened this issue Oct 3, 2024 · 2 comments · Fixed by #2746

Comments

@tvogel
Copy link

tvogel commented Oct 3, 2024

Description
When running supabase migration fetch, I receive

> npx supabase --create-ticket migration fetch 
Do you want to overwrite existing files in supabase/migrations directory? [Y/n] 
Connecting to remote database...
failed to scan targets: can't scan into dest[2]: cannot scan null into *string
Try rerunning the command with --debug to troubleshoot the error.
Sent crash report: a27a49210b894a6bbd9753984d8bf8c6

To Reproduce
I am actually not sure - might depend on the specific project.

Expected behavior
The migration data should be downloaded from the linked project.

System information
Rerun the failing command with --create-ticket flag.

  • Ticket ID: a27a49210b894a6bbd9753984d8bf8c6
  • Version of OS: opensuse:tumbleweed:20240927
  • Version of CLI: 1.200.3
  • Version of Docker: 26.1.5-ce, build 411e817ddf71
  • Versions of services:
    SERVICE IMAGE │ LOCAL │ LINKED
    ─────────────────────────┼──────────────────┼─────────────
    supabase/postgres │ 15.6.1.127 │ 15.6.1.127
    supabase/gotrue │ v2.162.1 │ v2.162.1
    postgrest/postgrest │ v12.2.3 │ v12.2.3
    supabase/realtime │ v2.30.34 │ -
    supabase/storage-api │ v1.11.7 │ v1.11.7
    supabase/edge-runtime │ v1.58.3 │ -
    supabase/studio │ 20240729-ce42139 │ -
    supabase/postgres-meta │ v0.83.2 │ -
    supabase/logflare │ 1.4.0 │ -
    supabase/supavisor │ 1.1.56 │ -
@sweatybridge
Copy link
Contributor

Thanks for reporting this bug. It's actually caused by a null value in your migration history table. I will push a fix to handle this client side. Meanwhile, you can also repair the history table by reverting the bad entry

supabase migration repair 20230501231133 --status reverted

@tvogel
Copy link
Author

tvogel commented Oct 11, 2024

Thank you for the explanation and the fix! 🪡

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 a pull request may close this issue.

2 participants