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

CLI commands are inconsistent in regards to local/remote project usage #2795

Open
d-e-h-i-o opened this issue Oct 23, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@d-e-h-i-o
Copy link

Describe the bug
Some commands that don't qualify the project use the local project (supabase migration up, supabase db reset) by default, while others use the remote project. This can easily lead to mistakes that affect production. Also the feedback from the CLI can add confusion (see example below).

To Reproduce
Steps to reproduce the behavior:

  1. Be connected to remote project (supabase db link)
  2. Run a migration locally; remove the file (e.g. because you change the git branch)
  3. Run supabase migration up
  4. The CLI now gives the feedback: Make sure your local git repo is up-to-date. If the error persists, try repairing the migration history table: supabase migration repair --status reverted 20241016101752
  5. Run that command
  6. Suprisingly, the remote project is being affected

Expected behavior
Only the local project should be affected – the CLI gave the hint, and in both cases, the command is not being qualified by a flag that would indicate a different project

Additional context
If applicable, add any other context about the problem here.

  • Supabase CLI version: 1.187.10
@sweatybridge sweatybridge added the bug Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants