Skip to content

Consistently use local database as the default#5145

Open
icopp wants to merge 1 commit intosupabase:developfrom
icopp:use-local-database-as-default
Open

Consistently use local database as the default#5145
icopp wants to merge 1 commit intosupabase:developfrom
icopp:use-local-database-as-default

Conversation

@icopp
Copy link
Copy Markdown

@icopp icopp commented Apr 28, 2026

What kind of change does this PR introduce?

The codebase currently has a truly nightmare state of commands randomly defaulting to the linked project or the local database depending on specific command, including some commands that mutate the database like migration repair. This change makes them all consistently default to the local database only, explicitly requiring --linked or --db-url to do anything destructive to another database. The change in default behavior will likely take a major version bump, but should save a lot of people from pain in the future.

What is the current behavior?

The only way to know which commands default to local behavior and which default to remote behavior is to individually look at the docs of every command.

See for example, #3493

What is the new behavior?

Every command defaults to local. A user must explicitly use --linked or --db-url to do anything that reads or affects anything but the local dev database.

The codebase currently has a truly nightmare state of commands randomly defaulting to the linked project or the local database depending on specific command, including some commands that mutate the database like `migration repair`. This change makes them all consistently default to the local database only, explicitly requiring `--linked` or `--db-url` to do anything destructive to another database. The change in default behavior will likely take a major version bump, but should save a lot of people from pain in the future.

For an example, see: supabase#3493
@icopp icopp requested a review from a team as a code owner April 28, 2026 17:21
@icopp icopp changed the title fix: consistently use local database as the default Consistently use local database as the default Apr 28, 2026
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