supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.09k stars 212 forks source link

feat: support config push command #2875

Closed sweatybridge closed 1 week ago

sweatybridge commented 1 week ago

What kind of change does this PR introduce?

feature

What is the new behavior?

Running supabase config push will prompt user to update linked project's config to match local config.toml. For eg.

Pushing config to project: vpefcjyosynxeiebfscx
Updating API service with config: diff remote[api] local[api]
--- remote[api]
+++ local[api]
@@ -1,7 +1,7 @@
 enabled = true
 schemas = ["public", "graphql_public"]
 extra_search_path = ["public", "extensions"]
-max_rows = 1000
+max_rows = 100
 port = 54321
 external_url = "https://127.0.0.1:54321"

Do you want to push api config to remote? [Y/n]

Answering Y (default) will call mgmt-api to update config, n will skip to next config, and ctrl + c will abort the update.

Additional context

Add any other context or screenshots.

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11810443631

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/config.go 5 13 38.46%
internal/config/push/push.go 0 16 0.0%
<!-- Total: 5 29 17.24% -->
Files with Coverage Reduction New Missed Lines %
internal/storage/rm/rm.go 2 89.53%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 11794104619: -0.09%
Covered Lines: 6386
Relevant Lines: 10706

💛 - Coveralls