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

Switching Between two different local Supabase Projects issue #2992

Open
danish-md opened this issue Dec 22, 2024 · 0 comments
Open

Switching Between two different local Supabase Projects issue #2992

danish-md opened this issue Dec 22, 2024 · 0 comments

Comments

@danish-md
Copy link

Describe the bug

When switching between two Supabase projects using supabase link and supabase unlink, running supabase start for the previously linked project results in an error. It appears the local Supabase environment remains configured for the new project, causing conflicts.

To Reproduce

Steps to reproduce the behavior:

  1. Create two Supabase projects: Set up two separate Supabase projects (e.g., Project A and Project B).
  2. Link to Project A: In your terminal, navigate to your Project A directory and run supabase link --project-ref <Project A ref>.
  3. Start Project A: Run supabase start. This should work correctly.
  4. Link to Project B: Navigate to your Project B directory and run supabase link --project-ref <Project B ref>.
  5. Start Project B: Run supabase start. This should also work correctly.
  6. Unlink Project B: Run supabase unlink.
  7. Attempt to start Project A: Navigate back to your Project A directory and run supabase start. This will likely result in an error.

Expected behavior

supabase start should successfully start the local Supabase environment for Project A, regardless of previous linking to Project B.

System information

Rerun the failing command (supabase start) with --create-ticket flag to get the Ticket ID.

  • Ticket ID: (a8823a2f0e3c4fc780eed197dc32183b)

  • Version of OS: Windows 11

  • Version of CLI: (2.1.1)

  • Version of Docker: (27.4.0)

  • Versions of services:

      SERVICE IMAGE      │      LOCAL       │   LINKED
    

    ─────────────────────────┼──────────────────┼─────────────
    supabase/postgres │ 15.6.1.116 │ 15.6.1.116
    supabase/gotrue │ v2.165.1 │ v2.165.1
    postgrest/postgrest │ v12.2.3 │ v12.2.3
    supabase/realtime │ v2.33.58 │ -
    supabase/storage-api │ v1.14.4 │ v1.14.4
    supabase/edge-runtime │ v1.65.4 │ -
    supabase/studio │ 20241202-71e5240 │ -
    supabase/postgres-meta │ v0.84.2 │ -
    supabase/logflare │ 1.4.0 │ -
    supabase/supavisor │ 1.1.56 │ -

Possible Cause

The supabase link command might be overwriting the local Supabase configuration, causing conflicts when switching between projects.

Proposed Solution

The Supabase CLI could potentially manage separate configurations for each linked project, allowing seamless switching without conflicts.

@danish-md danish-md changed the title Switching Between two different Supabase Projects issue locally Switching Between two different local Supabase Projects issue Dec 23, 2024
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

No branches or pull requests

1 participant